Hello! I'm asking is how to get the player that damages another player, not kill them? I know there is this function, "creator" but it only works when the creator kills (true?) What I'm showing you is a LocalScript in StarterCharacterScripts and I want this to affect everyone, and if they do damage to anyone, their bool value.stats go true. But in this case, it doesn't work, so how do I fix this? Thanks in advance.
local Humanoid = game.Players.LocalPlayer --.Character.Humanoid
function Damage()
local tag = Humanoid:findFirstChild("creator")
if tag ~= nil then
if tag.Value ~= nil then
local Leaderstats = tag.Value:findFirstChild("Status")
if Leaderstats ~= nil then
Leaderstats.Value = true
end
end
end
end
Humanoid.Character.Humanoid.HealthChanged:connect(Damage)

2 comments
If what was shown is a serverscript then using game.Players.LocalPlayer (line 1) shouldn't be possible?
It's a LocalScript in StarterCharacterScripts. What I said was wrong. oop