i want to create a script which clones the loot bags from replicated storage when an npc dies. im not sure how the bags can only appear on whoever killed the npc because im small brain
A good way to do that is to make a script that copies an item from server storage or something. after that, you can make a script that indicates when the health is >= 0.
I don't know your exact setup, but you can do something like this:
If script.parent.Humanoid.Health >= 0 then
game.serverstorage.item:Clone() game.serverstorage.item.parent = workspace game.workspace.item.Position = game.workspace.NPC.HumanoidRootPart.Position
end