local spawnlocation = {"SpawnLocation1","SpawnLocation2","SpawnLocation3","SpawnLocation4","SpawnLocation5","SpawnLocation6"}
spawnlocation.Parent = game.Workspace
script.Parent.MouseButton1Click:connect(function()
for i= 1,#spawnlocation do
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(spawnlocation[math.random(1,#spawnlocation)].Position + Vector3.new(0, 3, 0))
wait(1)
script.Parent.Parent:remove()
end
end)
Not sure why I get this error. What this script is supposed to do is move the character to a random spawn. Any ideas? :/

1 comment
The SpawnLocations are strings, you need to have actual objects to get the Position.