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
Hello, turbomegapower12345!
I know why your script isn't working, It must be a Local Script and must have a variable that reffers to player!
Example of working one:
local TeleportService = game:GetService("TeleportService") local gameID = 1559604744 local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() if player then TeleportService:Teleport(gameID, player) end end)
This don't will teleport if you're in studio, must be a server!
Good Luck with your games!