This is my script;
local part = script.Parent
part.Touched:connect(function()
local chance = math.random(1,100)
if chance > 1 and chance < 40 then
game.Players.LocalPlayer:WaitForChild("Humanoid").Walkspeed = 0
game.Players.LocalPlayer.PlayerGui.BattleGuiTest:WaitForChild("IntroTop"):TweenPosition(UDim2.new(0, 0,0, 0),'Out','Bounce',3.5)
game.Players.LocalPlayer.PlayerGui.BattleGuiTest:WaitForChild("IntroBottom"):TweenPosition(UDim2.new(0, 0,0, 200),'Out','Bounce',3.5)
wait(5)
game.Players.LocalPlayer.PlayerGui.BattleGuiTest:WaitForChild("BattleBackGround").Visible = true
wait(0.5)
--Might add functions
game.Players.LocalPlayer.PlayerGui.BattleGuiTest:WaitForChild("IntroTop"):TweenPosition(UDim2.new(0, 0,-1, 0),'In','Bounce',3.5)
game.Players.LocalPlayer.PlayerGui.BattleGuiTest:WaitForChild("IntroBottom"):TweenPosition(UDim2.new(0, 0,0, 600),'In','Bounce',3.5)
end
end)
The error is infinite yield so basically can't find it, how would I find the Humanoid of the player? This line here: game.Players.LocalPlayer:WaitForChild("Humanoid").Walkspeed = 0
Please help, I need to find the humanoid
