It appears to me that the script is looking for the leaderstats inside of the zombie with tag = Humanoid:findFirstChild(“creator”) unless it’s a reference to the player who killed it?
Im not sure, but it works with a sword so i think its a reference.
You would have to see how the sword went about accessing and editing the “creator” value and replicate that inside of the projectile as that seems to be the player, or edit the money from the server sided script of the projectile based upon the player parameter.
Ok I will check how the sword did that.
Here is everything with creator in it:
function TagHumanoid(humanoid, player)
local Creator_Tag = Instance.new(“ObjectValue”)
Creator_Tag.Name = “creator”
Creator_Tag.Value = player
Debris:AddItem(Creator_Tag, 2)
Creator_Tag.Parent = humanoid
end
function UntagHumanoid(humanoid)
for i, v in pairs(humanoid:GetChildren()) do
if v:IsA(“ObjectValue”) and v.Name == “creator” then
v:Destroy()
end
end
end
seems that this is what you need to do, in the projectile that hits the zombie with the player parameter set the creator value to that parameter.
So you mean the gun bullet? If yes, do you mean inside the script that makes the bullet do damage?
Yep, sorry had to run to the washroom. Inside what makes it damage you would change it
oh its fine I though you left. everyone has to go to the washroom😂
Inside the script that makes it do damage
Yep, you will find the creator value and change it to the player, if it’s a projectile absed ranged weapon it will likely be in an OnTouched function that’s connected to the touched event, or hitscan just look for anything that does damage and place it right after that.
Ok thanks i will do that and put it right after the damage part
It didint work but this is what I changed to the part that does damage:
local function _defaultDamageCallback(system, target, amount, damageType, dealer, hitInfo, damageData)
if target:IsA(“Humanoid”) then
target:TakeDamage(amount)
Creator_Tag.Value = player
end
end
Hello? Are you still here? It didint work but this is the change I made:
local function _defaultDamageCallback(system, target, amount, damageType, dealer, hitInfo, damageData)
if target:IsA(“Humanoid”) then
target:TakeDamage(amount)
Creator_Tag.Value = player
end
end
Do you have a reference to what Creator_Tag is in that script?
No I dont it puts a blue line under Creator_Tag.Value
It also puts a blue line under player for somereason.
make sure you create it as a variable first, like local Creator_Tag = target.Parent.creator
Ok I have done that, but it puts a blue line under player for some reason.
Also the gun dosent work now for somereason.
Do you have player declared anywhere in that script?