I have been trying to find a way to make a part follow a specific person when they get close, but I can't find out a way to get the person's name and tell the part which person to go towards without making a script with the specific person's name in it. Can someone help me?
Using the Players Service
, we can tell when a player joins the game and get that specific player. Example,
-- Regular script game.Players.PlayerAdded:connect(function(plr) print(plr.Name)-- Prints players' names end)
This is what I think you meant. We can use the CharacterAdded event
of the player we got from the PlayerAdded event
. Example,
-- Regular script game.Players.PlayerAdded:connect(function(plr)-- Gets the player plr.CharacterAdded:connect(function(char)-- Gets the character local Torso = char:WaitForChild("Torso")-- Gets the torso end) end)
Good Luck!