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?
You din't define what player is. You would have to define player.
--For local-scripts local Player = game.Players.LocalPlayer --For Server-scripts local Player = script.Parent.Parent until the Parent is a Player.