I have tried a lot but I still cant get a working Teleport GUI, and by that I mean one that teleports you to different places. Here is what I tried
local TeleportService = game:GetService("TeleportService")
local gameID = 1559604744
script.Parent.MouseButton1Click:connect(function()
print("HI")
if player then
TeleportService:Teleport(gameID, player)
end)
please help me and thanks

2 comments
Oh, thanks so much, I have one more question. Does it have to be in Starter Player Scripts?
No, it have to be on the gui you want the player to click