I have had difficulty creating a script that try’s to indicate the player on where to walk when they start the game(Tutorial). Whenever the player died I had to reset the attachment to their new character’s upper torso. I got it working, and when I was testing it, it seemed to work flawlessly until about the thirtieth time my player died. It stopped working and gave me this blue message.
It works ok if I change the wait() to wait(0.1) in my loop. But I’m unsure why and it looks bad and I still don’t what this error is.
In output, make sure you have all outputs enabled. The blue text is ALWAYS accomponied by either an error or a warning
Everything seems to be selected
Before when I was not using :WaitForChild, it would be accompanied by a error. But the while loop seemed to run to fast to detect if the human had died in a split second, so I added in the WaitForChild:, now it just fails after a long time. Nothing changes in the code over time. It just fails and gives me this blue message.
if plr.Character.Humanoid.Health > 0 bit, can you please change it to:
if plr.Character.Humanoid.Health > 0 and plr.Character:FindFirstChild("UpperTorso")
while wait() do
if plr.Character.Humanoid.Health > 0 and plr.Character:FindFirstChild(“UpperTorso”) then
att0.Position = plr.Character:WaitForChild(“UpperTorso”).Position
Thanks, this code seems to work flawlessly. Do you think I still need the :WaitForChild then?