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

i need help with my place teleportation gui?

I really need help with a script i am working on. It is supposed to allow players to teleport to different places on roblox. I need one that teleports a player to a place that is not part of a game and is not the owner

This is the current code i have.

function teleport() player = script.Parent.Parent.Parent.Parent.Parent.Character game:GetService("TeleportService"):Teleport(place id here, player) end script.Parent.MouseButton1Click:connect (teleport)

I need help to let players to teleport to a place that is not part of a game.

Please help.

also this is for a game i am making. i want players to be able to add places to my gui so other players can teleport to it

2 answers

✓ Accepted answer
PlaceID = 000 --The place ID where you want to teleport them
script.Parent.MouseButton1Click:connect(function() 
game:GetService("TeleportService"):Teleport(PlaceID)
end
--PUT THIS IN A LOCALSCRIPT!!!

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