I have tried tons of scripts but none will work for my SurfaceGUI on a simple part. I click it and nothing happens, nothing in the output too. I want it to teleport to a place in my game universe. Here is the code I've tried recently.
function onClicked(playerWhoClicked)
local player = game.Players[playerWhoClicked]
if player then
game:GetService("TeleportService"):Teleport(512970811, player)
end
end

5 comments
If you post the code it would help us better answer your question....
Edited.
Did you connect the event?
Um as far as I know, no.
Well, that would be a problem. Check the wiki for connecting events.