I am trying so hard not to rage quit on this 1 script. Its not working at all. Its not showing any errors either. Is it because I didnt add a leaderbaord to keep track of the score? Idk anymore... NOTHING WORKS....
script :
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Char)
Char:WaitForChild("Humanoid").Died:connect(function()
if Player.TeamColor == BrickColor.new("Camo") then
game.Teams.Sentinel.Score = game.Teams.Sentinel.Score + 1
script.Parent.Text = game.Teams.Sentinel.Score
elseif Player.TeamColor == BrickColor.new("Bright red") then
--What i've done is, what if the other team kills the other person? This would give them a score as well.
game.Teams.Atlas.Score = game.Teams.Atlas.Score + 1
script.Parent.Parent.Atlas.Text = game.Teams.Atlas.Score
end
end)
end)
end)
--I made another script because of the possible error I could have made, but it still doesn't work.
-- Perci said something about the score value and stuff so I gave it a shot. But it doesn't work.
game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("Model")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local Score = Instance.new("IntValue") --We create a new IntValue
Score.Name = "Score" --this is the name you want the leader-stat to be when it shows up in-game.
Score.Value = 0 --this is the value of money the new player starts out with. To change this, you can add some more code (shown later)
Score.Parent = leaderstats -- Set the money object as a child of the leaderstats object.
end)

6 comments
Is this a LocalScript? PlayerAdded and CharacterAdded, as well as the Died event, don't always work properly in LocalScripts.
Is 'Score' an IntValue in the Team object or something?
isnt score a property of a team? So would I have to make that an int value? And if I did, I would put it in players i assume?
No, there is no Score property. Look this stuff up.
Me and someone else already answered this question you deleted...
Ik. I changed it. And it still doesnt work.