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 comment
I've read that article countless times. It doesn't say anything about surfaceguis.