Hello, i am making a First Person Shooter where you start off in a room, but when the next match comes, you click join, and you join the next map. for some reason I'm having troubles with the teleporting GUI. here is my Teleporter script:
if script.Parent.JoinButton.Text == "Join" then
player = game.Players.LocalPlayer
s1 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint
s2 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint2
s3 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint3
s4 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint4
s5 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint5
s6 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint6
s7 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint7
s8 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint8
s9 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint9
s10 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint10
s11 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint11
s12 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint12
s13 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint13
s14 = game.Workspace.GiantRoom.SpawningPoints.SpawningPoint14
--VARIABLES for spawn points on map
end
if script.Parent.JoinButton.Text == "Join" then
Spn = math.random(1,2)
if spn == 1 then
function Teleport()
player.Character.Torso.Position = s1.Position + Vector3.new(0,5,0)
end
script.Parent.JoinButton.MouseButton1Down:connect(Teleport)
end
if spn == 2 then
function TeleportTwo()
player.Character.Torso.Position = s2.Position + Vector3.new(0,5,0)
end
script.Parent.JoinButton.MouseButton1Down:connect(TeleportTwo)
end
end
-- Random Spawn Teleporter

3 comments
Use a for loop it iterate through the "SpawnPoints" object & have the children be added to a table, instead of doing lines 3-16.
when i use torso.Position it kills me. instead use CFrame, it moves the whole body at the same time. tho for the no teleporting part, idk how i can help, i never made a teleporter.
ok, thanks for the info