Found it. Change this to the player who fired the gun or their name, forget which is used here.
That’s not going to work.
It’s an ObjectValue. Like I said, use the tool:FindFirstAncestorWhichIsA(“Player”) method.
Wait, would I change this to using that method you told me?
tagHumanoid(h)
All I said was that he should be replacing it with the Player object or the player’s name, I didn’t remember which he used. Guess it was player object then!
Thanks for clarifying.
local tool = script.Parent
local player = tool:FindFirstAncestorWhichIsA("Player")
function tagHumanoid(humanoid, player)
local creator_tag=Instance.new("ObjectValue")
creator_tag.Value=player
creator_tag.Name="creator"
debris:AddItem(creator,3)
creator_tag.Parent=humanoid
end
... -- in the damage function
tagHumanoid(humanoid, plr)
You’re welcome, sorry if I came off a bit rude.
Is the “humanoid” meant to be undefined?
It’s fine. I apologize if I seemed upset, didn’t mean it to be that way.
Important thing is that the problem was solved
Humanoid is the humanoid that you had damaged, you are supposed to put that part in your damage function.
Don’t forget to remove the leaderstats part, you should have duplicate leaderstats after this.
Alright. I just tried and now it works. Thank you guys so much!!!