I want to teleport to another place after pressing a textbutton I have in my StarterGui. How do I do it?
PlaceId = '1392880606' Game.Players.PlayerAdded:connect(function(player) wait(2) if not player.Character then player:LoadCharacter() end Game:GetService('TeleportService'):Teleport(PlaceId,player.Character)
Please anyone knows what can I do?
local TeleportService = game:GetService("TeleportService") local Place = 123456789 -- Put place Id here local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() TeleportService:Teleport(Place, player) end)
Put this script inside you're textbutton