#common error

5 messages · Page 1 of 1 (latest)

covert hound
#

Maybe line 70. WaitForChild() has no argument passed to it, so it's effectively nil. Can't call a function (PivotTo) on nil

#

Did you perhaps mean

local enemyModel = workspace.Enemies:WaitForChild("Angered")
covert hound
#

Yeah, if the child takes too long to get there it'll throw that error:

If a call to this function exceeds 5 seconds without returning, and no timeOut parameter has been specified, a warning will be printed to the output that the thread may yield indefinitely; this warning takes the form Infinite yield possible on 'X:WaitForChild("Y")', where X is the parent name and Y is the child object name.
#

I don't know the entire nature of your project, but maybe this post will help: https://devforum.roblox.com/t/findfirstchild-and-waitforchild-addressing-common-bad-practices-and-habits-of-each/317491

covert hound
#

Noice. Good luck with the rest 🙂