repstorage.RoundTag.Changed:connect(function(value)
if value == true then
print("1")
if repstorage.GameRound.Value == "Deathmatch" then
print("2")
for _, player in pairs(game.Players:GetPlayers()) do
print("3")
player.CharacterAdded:connect(function(character)
print("4")
character:WaitForChild("Humanoid").Died:connect(function()
print("5")
wait()
if character.Humanoid:FindFirstChild("creator") then
print("6")
local tag = character.Humanoid.creator
local plr = tag.Value
local tColor = player.TeamColor
local kColor = tag.Value.TeamColor
if not kColor then return end
if not tColor then return end
if tColor ~= kColor then
if kColor == BrickColor.new("Lime green") then
greenscore.Value = greenscore.Value + 1
elseif kColor == BrickColor.new("New Yeller") then
yellowscore.Value = yellowscore.Value + 1
end
end
end
end)
end)
end
end
end
end)
Ok, so this works but, for it to work you must: Kill someone first, then kill them AGAIN to get the score + 1. How come it takes 2 deaths for the score to start working. I want so if you kill them it gives you a score straight away. Please help.
EDIT
Output 1 2 3 3 4 Prints 1 2 3 3 when game starts and 4 when the player dies
When you kill a player again then it prints 5 and 6

3 comments
I figured out the problem, sorry it took so long.
please read my comment there is an error on line 7 of your code with the player
Try it now.