Sorry for the bad English, I'm not native.
I was trying to do a dash script for my game,the code was working well, but I wanted that the dash would only be possible while jumping.So, i tried to put a humanoid:GetState() == Enum.HumanoidStateType.Freefall,and didn't work.So,I tried putting local character= script.Parent and local humanoid= character:WaitForChild("Humanoid"), but now when I try to run the code, Infinite yield possible on'Players.extroias.PlayerScripts:WaitForChild("Humanoid")' appears on the output.
here's the code
local UIS = game:GetService("UserInputService")
local localPlayer = game.Players.LocalPlayer
local character= script.Parent
local humanoid= character:WaitForChild("Humanoid")
local CD=5
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E and humanoid:GetState() == Enum.HumanoidStateType.Freefall then
local Root = localPlayer.character:WaitForChild("HumanoidRootPart")
Root.Velocity = Root.Velocity + Root.CFrame.lookVector*90
script.Disabled = true
wait(CD)
script.Disabled = false
end
end)
I want to know what does this output mean, and how to fix it.

1 comment
Your English is good, and you answered both of the questions, why and how to fix it. Good answer