#Expected identifier
60 messages · Page 1 of 1 (latest)
try putting whatever is in isonground in the if statement
replace whatever is in isonground with the isonground in the if statement maybe
it didn't work bc the local line w the problem is still identifying isOnGround so I can't put it in the if statement I just tried it thanks for the suggestion tho I didn't think about that
can you screenshot the error
** You are now Level 1! **
its at the top
in that ss im hovering over the error and its more zoomed out so you can see pretty much the whole thing but the line covered by the error is in the ss I first sent if you need to see that too
you did "if humanoid.floormaterial ~= air and humanoid.floormaterial ~= water then"?
?
the only if in there is the one covered by the error in the second ss but that says if isOnGround then
if thats what you meant
can you make it a code block?
also wat i meant is to replace the if statement with "if humanoid.floormaterial ~= air and humanoid.floormaterial ~= water then"
ohhh ok
and i dont know how to make a code block im still VERY new to this stuff
sorry
np
I tried replacing the if statement and the same error is still in the same spot im going to try to go through the code again and look for a missing parenthesis or something because I think it might be a syntax error
just copy and paste it
huh
the code
I did copy and paste your suggested if statement and its still the same error
copy and paste your script so i can see it lol
the if statement part
if humanoid.FloorMaterial ~= Enum.Material.Air and humanoid.FloorMaterial ~= Enum.Material.Water then
what error do you get for that one
its not that line its the one above it
** You are now Level 2! **
its local isOnGround = humanoid.FloorMaterial ~= Enum.Material.Air and humanoid.FloorMaterial ~= Enum.Material.Water
maybe remove this one then
or comment it out
see if it works
and the error is expected identifier when parsing expression, got 'local'
I can't because its defining the isOnGround variable
so everything else gets an error
i dont think you can put that kinda stuff in a variable
can you copy and paste this part?
local isOnGround = humanoid.FloorMaterial ~= Enum.Material.Air and humanoid.FloorMaterial ~= Enum.Material.Water
if humanoid.FloorMaterial ~= Enum.Material.Air and humanoid.FloorMaterial ~= Enum.Material.Water then
if moveDirection == Vector3.new(0,0,0) then -- if player is not currently moving/walking
dashDirection = HRP.Position + Vector3.new(lookVector.X, 0, lookVector.Z)
else -- if player are currently moving/walking
dashDirection = HRP.Position + Vector3.new(moveDirection.X, 0, moveDirection.Z)
end
-- using bodygyro to rotate player to the dash direction smoothly
local bodyGyro = Instance.new("BodyGyro")
bodyGyro.Parent = HRP
bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
bodyGyro.D = 0 -- D is the dampening
bodyGyro.P = 500000 -- P is aggressiveness
bodyGyro.CFrame = CFrame.lookAt(HRP.Position, dashDirection) -- Making player look at the dash direction
local attachment = Instance.new("Attachment")
attachment.Parent = HRP
-- now using VectorForce to move player forward
local vectorForce = Instance.new("VectorForce")
vectorForce.Parent = HRP
-- VectorForce need attachment to tell where is player looking at
vectorForce.Attachment0 = attachment
vectorForce.Force = Vector3.new(0,0,minusVelocity) -- now it will move player forward as the settings
loadedAnimation:Play() -- play the dash animation
humanoid.AutoRotate = false -- prevent player to rotate by themselves
wait(duration)
humanoid.AutoRotate = true
vectorForce:Destroy()
bodyGyro:Destroy()
attachment:Destroy()
wait(duration) --- give some time before stopping the dash animation
loadedAnimation:Stop()
end
the "local" in the very first line is the one w the error
ok so, remove the line defining the isonground statement
or make it a boolean
if humanoid.FloorMaterial ~= Enum.Material.Air and humanoid.FloorMaterial ~= Enum.Material.Water then
isongrond = true
else
isonground = false
you can do something like that
you wanna see something funny
same problem same spot
dog wtf is wrong 
im just gonna look the whole script over again and try to see if its just a missing parenthesis or something
can you screenshot it