✓ Accepted answer
Well it can be this lines
Players.leaderstats.Kills.Value = Players.leaderstats.Kills.Value
because the value of your kills is equal to your number of kills
so let's edit it
local This = script.Parent
This.Touched:Connect(function(Characters)
local Players = game.Players:GetPlayerFromCharacter(Characters.Parent)
local Aye = Characters.Parent:FindFirstChild("Humanoid")
if Aye then
Players.leaderstats.Kills.Value = Players.leaderstats.Kills.Value + 1
end
end)
This is the problem.
So the kills of the player is equal to the kills of the player so if you want to add the kills for the player just add
Players.leaderstats.Kills.Value = Players.leaderstats.Kills.Value + 1
So if the kills of the one player is 25 and the function call, the kills of that player will be added by 1. So if you want the player touched once the part use debounce. And you can replace 1 to any number of kills that you want to add in the player's kills.
WARNING:Use only the script above
6 comments
Tried, but still, there's nothing changed when i clicked play,It's still doesn't give me 1 kill
There's nothing shows in output window so i can't know what is the problem
i will edit it
ummm just i edit the part "if not Aye == nil" because Aye is not nil but just use only "if Aye then" to understand the script better
re copy the script again
It seems like not the script problem, but the game problem.Anyways, thanks for the answer :>