Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how can i make a script that spawns loot bags when you kill an npc?

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

1 comment

0

You could fire an remote event from the server to whoever killed the Npc

1 answer

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

1 comment

0

i mean i want it to be only shown by who killed the npc

This discussion is preserved as it was. New answers, comments, and votes are closed.