Is there a way to make this function only work if the local player is the killer?
local Array = require(game.Workspace.Inventory)
local inventory = Array[1]
local addItem = Array[2]
function onDeath ()
addItem("Gun")
print("boss killed")
end
game.Workspace.NPC:WaitForChild("Humanoid").Died:connect(onDeath)
Yes, this code works but adds the Gun to everyone. I have a modulescript set up to do this but I don't think it's necessary to post it here so I left it out, thanks!
