I'm trying to make the variable kills so that it only counts from the start of your KOs and not from 0.
kills = 0 game.Players.LocalPlayer.CharacterAdded:connect(function() kills = 0 local start = game.Players.LocalPlayer.leaderstats.KOs.Value game.Players.LocalPlayer.leaderstats.KOs.Changed:connect(function(amount) kills = amount - start end) end)
Example, if I had 0 kills, and get 5 kills, it will be 5 kills, ok. But in my next character respawn, (now I still have 5 kills in my leaderboard), if I get 5 more kills (10 in total), it will not say 5, it will say 10. How do I fix it so it says 5 only? And the thing saying it is the variable kills.
kills = 0 game.Players.LocalPlayer.CharacterAdded:connect(function() kills = 0 local start = game.Players.LocalPlayer.leaderstats.KOs --You can't use .Value in a variable game.Players.LocalPlayer.leaderstats.KOs.Changed:connect(function(amount) kills = amount - start.Value end) end)
I don't know why, but this just happens, you can't use '.Value' when setting a variable