this is my script
local tele = workspace.Teleports.SuperMan
local x = tele.Position.x
local y = tele.Position.y+5
local z = tele.Position.z
script.Parent.MouseButton1Down:connect(function()
(Player Goes Here).HumanoidRootPart.CFrame = CFrame.new(x,y,z)
end)
it is inside a surface gui and it doesn't work in a local script some reason

3 comments
LocalScripts have to be inside the Player or the Player's Character to function.
The MoustButton1Down event will not trigger when called from a Surface Gui, consider using a GuiButton or a ClickDetector
^ This is a correct answer.