#player looping not working

1 messages · Page 1 of 1 (latest)

royal marlin
#

im making a rounds system with one killer and the rest are survivors, i made it chose one killer then loop through survivors setting their survivor value to true and then teleporting them, but the value setting won't work.
here is my code.

local plrs = game.Players:GetPlayers()
local players = game:GetService("Players"):GetPlayers()

for i = #plrs, 1, -1 do
--if players[i].Name == killer.Name then return end
local player = plrs[i]
if player.Character and player.Character:FindFirstChild("survivor") then
player.Character.survivor.Value = true
end
local folder = workspace:FindFirstChild("Survivor spawns"):GetChildren()
print(folder)
if #folder > 0 then
local survivorspawn = folder[Random.new():NextInteger(1, #folder)]
killer.Character:WaitForChild("HumanoidRootPart").CFrame = survivorspawn.CFrame * CFrame.new(0, 4, 0)
print(survivorspawn)
else
print("No spawns!")
end
end

#

send help

pallid palm
#

So the survivor boolValue is not being set to true?

#

How did you test it though?