Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Only 1 person gets teleported?

Asked by 3 years ago
Edited 3 years ago

Im scripting a swordfighting game following AlvinBlox's tutorial and I made sure to follow everything exactly, but it only teleports one person when the game starts. Can someone help?

(the first line of code doesnt get marked as code idk why)

local AvailableSpawnPoints = SpawnPoints:GetChildren()

for i, player in pairs(plrs) do
    if player then 
        character = player.Character

        if character then

            character:FindFirstChild("HumanoidRootPart").CFrame = AvailableSpawnPoints[1].CFrame
            table.remove(AvailableSpawnPoints,1)

            local Sword = ServerStorage.Sword:Clone()
            Sword.Parent = player.Backpack

            local GameTag = Instance.new("BoolValue")
            GameTag.Name = "GameTag"
            GameTag.Parent = player.Character

        else

            if not player then
                table.remove(plrs,i)
0
Do you want a random player? Uygi1234 0 — 3y

Answer this question