I want to make my gui's textbutton to teleport to another place. I tried with two scripts, but they didn't work. Please help
COMMUNITY QUESTION
How do I teleport to another place with a textbutton?
1 answer
I believe it should look something like this (in a LocalScript that's inside the button):
local placeId = 5847573 --change to place id
script.Parent.MouseButton1Click:Connect(function()
game:GetService("TeleportService"):Teleport(placeId,game.Players.LocalPlayer)
end)
2 comments
0
It didn't work
0
Any errors?
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Please show what you've tried.