Hiya! I'm having some trouble with a script...it's a problem I've encountered in the past but I was never able to figure it out. Take a look:
local enable = true
local player = game.Players.LocalPlayer
local anime = script:WaitForChild('Animation')
script.Parent.MouseButton1Click:connect(function()
if enable == true then
enable = false
local animationTrack = player.Character.Humanoid:LoadAnimation(anime) -- doesn't work
wait(2)
enable = true
end
end)
I'm not sure what is wrong... and here's what the output is telling me:
20:02:33.440 - Infinite yield possible on 'Players.Lukeisbossman64.PlayerGui.list.scrolly.wave.LocalScript:WaitForChild("Animation")'
20:02:33.442 - Stack Begin
20:02:33.443 - Script 'Players.Lukeisbossman64.PlayerGui.list.scrolly.wave.LocalScript', Line 3
20:02:33.443 - Stack End
I tried taking the WaitForChild thing out in the 3rd line on the script, but the output said that it couldn't find it as a child(not enough time to load.) So... this has left me confused. Any Help?

4 comments
It means that there is an infinite yield possible.
Wow! So helpful! My script works now. NOT
Make sure it is named correctly, spelt correctly and all capital letters done correctly.
also what you are doing is looking for children of the script, not the parent if the script