I can never figure this out, could anybody help me out here?
Hmm, Try this (Place inside the TextButton);
repeat wait(0)until game.Players.LocalPlayer and game.Players.LocalPlayer:FindFirstChild("PlayerGui") -- Repeats waiting 0 seconds until LocalPlayer, and LocalPlayer's PlayerGui local PlaceId = 000000 --Replace the 0's with the place ID you want the player to teleport two when player clicks on it script.Parent.MouseButton1Down:connect(function() --When LocalPlayer clicks on the Gui game:GetService("TeleportService"):Teleport(PlaceId, game.Players.LocalPlayer) --Teleports the LocalPlayer to the desired place end) --The end) for the MouseButton1Down event
Hope this helped!
local MyPlaceId = 0 local IWANNATELENOW = game:GetService("TeleportService") local player = game.Players.LocalPlayer function IGOTABUCKETLOADOFCHEESE() IWANNATELENOW:Teleport(MyPlaceId, player) end script.Parent.MouseButton1Click:connect(IGOTABUCKETLOADOFCHEESE)