Creating a teleportation GUI

I’m trying to create a GUI that you can use to teleport to different locations, and I have a script that works in Roblox Studio, but doesn’t work when the game is published. No errors are appearing in the output or developer console, so I don’t know what I’m doing wrong.

Current Script

function Click()
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(0, 0, 0)
end
script.Parent.MouseButton1Down:connect(Click)

1 Like

If this is a local script you should use game.Players.LocalPlayer other then that I don’t think it shouldn’t work