What's Wrong With Line 5?!?!?!
spawn = game.Workspace.SpawnLocation
player = script.Parent.Parent.Parent.Parent
function onClicked
player.Character:MoveTo(spawn.Position) -- '(' expected near 'player'
end
script.Parent.MouseButton1Down(onClicked)
for index, player in pairs(game.Players:GetPlayers()) do
print(player.Name)
end
My previous question was my Teleport GUI Help and it wasn't answered quite right or I just didn't understand the script. The Script that I made:
spawn = game.Workspace.SpawnLocation
player = script.Parent.Parent.Parent.Parent
function onClicked
player.Character:MoveTo(spawn.Position)
end
script.Parent.MouseButton1Down(onClicked)
But then yumtaste (who answered my question) said to incorporate this:
for index, player in pairs(game.Players:GetPlayers()) do
print(player.Name)
end
to my script but I'm having trouble. Can you please help me? I need a complete script ASAP. Thx guys!

3 comments
You are using the function incorrectly, or, as I should say, typed it incorrectly, on line 4.
So what should it be?
You did not add the parentheses, or the '()' things, I should say.