Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you universe teleport a player with a surfaceGUI?

I've been trying to figure this out forever. I assumed this process would be really similar to a screenGUI but it never seems to work out. The closest I can get this to work is in PlaySolo.

I have this ServerScript inside of an image button of the surfaceGUI:

local service = game:GetService("TeleportService")
local id = 186379525
local plr = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
	wait(1)
	service:Teleport(id, plr)
end)

I used this script in a different game I made with a screenGUI, but it was a LocalScript instead of a ServerSript.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.