Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

One-player teleport script?

So that it only teleports ONE player.

On a server with 20 people.

1 answer

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 :/

2 comments

0

No, a script. Not a button. So, after like 3 seconds, it teleports only ONE player to a certain position..

1

This won't work because you wrote "local" before a variable which isn't in the function.

This discussion is preserved as it was. New answers, comments, and votes are closed.