How to teleport any player?
01 | function onChatted(msg, recipient, speaker) |
03 | local source = string.lower(speaker.Name) |
05 | msg = string.lower(msg) |
09 | game.Workspace.Player 1. HumanoidRootPart.CFrame = CFrame.new(- 1899.747 , 492.098 , - 95.816 ) |
15 | function onPlayerEntered(newPlayer) |
16 | newPlayer.Chatted:connect( function (msg, recipient) onChatted(msg, recipient, newPlayer) end ) |
19 | game.Players.ChildAdded:connect(onPlayerEntered) |
Hello, I was wondering how to make this script work for all players. Right now it only teleport Player1. I tried lots of things and they do not work. For example:
1 | recipient.Character.HumanoidRootPart.CFrame = CFrame.new(- 1899.747 , 492.098 , - 95.816 ) |
1 | speaker.Character.HumanoidRootPart.CFrame = CFrame.new(- 1899.747 , 492.098 , - 95.816 ) |
Is there a special tag for a player or something?
Thanks.