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

How do i make a good teleporter? [Done]

Please help, i would like to make a good teleporter like one from the Egg Hunt 2014.

1 answer

function onTouched(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player then
	game:GetService("TeleportService"):TeleportToSpawnByName(1, "SpawnLocation", player) --Replace the, "1" with the placeID.
    end
end
 
script.Parent.Touched:connect(onTouched)

If you make the message pop on the screen everyone will see that someone is teleporting. You can't test in Studio because someone managed to go into a live game and he could use tools and such so... You need to test it out in your actual game.

2 comments

0

okay thanks

0

Accept answer plz?

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