WaitForChild() Issue

If you want to get the character, then you do workspace:WaitForChild(player.Name) in script2, as this will wait for a child in workspace with the same name as the player. You put a string value in WaitForChild to do this (in this case being player.Name).

Some criticism I would give is that you should always do game:GetService("Players") instead of game.Players. Do this for every service except workspace, as that is already a variable. As well as this, when creating an instance, you should set the parent of it AFTER you set the values to it. The reason why can be seen in this post: PSA: Don't use Instance.new() with parent argument

Hope this helps!

1 Like