0

So I'm making a survival horror game and I need it so it can somehow know if a player has escaped to a player being killed. The script checking if there are no players in a team is below. Please help!

if #teamplayers == 0 then
for _, v in pairs(game.Players:GetChildren()) do
if v.TeamColor == BrickColor.new("Carnation pink") then
v.CharacterAppearanceId = v.UserId
v.TeamColor = BrickColor.new("White")
v.CharacterAppearanceId = v.UserId
print("eeeee")
game.ReplicatedStorage.ESallyhasWon:FireAllClients()
wait(3)

script.CountDown.Value = 0
end
end
end

0
any output errors? Lunaify 66 — 1y
0
There's nothing wrong with the script. I just need ideas on how it would work. What I mean is I need the script to somehow know between a player dying and a player escaping. NiroTurtle 83 — 1y
0
So if you're wanting to separate players in any way, I'd would either use a set of tables to store the different playerstates or use CollectionService to tag players. ForeverBrown 355 — 1y
0
Thanks! I'll definitely try using tables. NiroTurtle 83 — 1y