Infinite yield possible on WaitForChild("Character")


I tried to do that in StarterPlayerScript, StarterGui
I am trying to make player’s WalkSpeed into 0 as well as the JumpPower

Any solution to solve this issue?

6 Likes

I don’t think you can use WaitForChild() on character cause it isn’t a child of a player Correct me if I’m wrong. Instead, use something like this:

local character = player.Character or player.CharacterAdded:Wait()
15 Likes

it worked, Thanks! 30characters

6 Likes