So that it only teleports ONE player.
On a server with 20 people.
So that it only teleports ONE player.
On a server with 20 people.
This should work if it's a button
local player = game.Players.LocalPlayer
function onClick()
game.Workspace[player.Name].Torso.CFrame = CFrame.new(Vector3.new(0, 5, 0)) -- You can change the (0, 5, 0)) to whatever is appropriate for the teleport
end
script.Parent.MouseButton1Click:connect(onClick)
This should work only if it's a button. If you test it and it teleports all players then try putting this into a local script instead of a regular script. But it should work just fine in a regular script.
You should've explained better :/
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
No, a script. Not a button. So, after like 3 seconds, it teleports only ONE player to a certain position..
This won't work because you wrote "local" before a variable which isn't in the function.