spawn = game.Workspace.SpawnLocation player = script.Parent.Parent.Parent.Parent
function onClicked() player.Character:MoveTo (spawn.Postion) end
script.Parent.MouseButton1Down:connect (onClicked)
I'm trying to make a teleport back to spawn but I'm confused that it wouldn't click. Is there another script that I need to use. Like two scripts or local script or just ClickDetector?

3 comments
It's not really clear to me of what your saying
Well, You din't define player in your script, So when it tries to use player it would error and not work, So in my script it tells you how to define player for a localscript or regular script. These versions only work for scripts inside of PlayerGui or Backpack though. I assumed your script is in one of those two since you din't use a ClickDetector?
I'm am also have problem where the TextButton wont work