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

This breaks after player's death?

I have an in-game shop where a player can purchase a weapon with Leaderboard credit.

Here's the problem. The weapon does get inserted into the player's backpack after purchase. But after they die. It's not there anymore. How can I get it to stay in they're backpack? I tried using the StarterPack but I had the exact same issue.

1 comment

0

You need to also put a copy into the player's StarterGear!

2 answers

object:clone().Parent = player.Backpack --Change object and player to the correct name you are using object:clone().Parent = player.StarterGear --Same here

When you place it into your Backpack and then die it will go away because of the fact that objects in your backpack are only temporary and will be removed after you die. If you want the item to appear every time someone spawns then you need to place it into the StarterPack.

object:clone().Parent = game.Players.player.Backpack --Change object and player to the correct name you are using

object:clone().Parent = game.StarterPack --Will make it so ANYONE who spawns acquires weapon. Remember to change 'object' to the correct name

One of these was already said but I wanted to put it into the code block and give a better explanation.

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