So recently i have been making a swordfight game and made a Shop GUI, But whenever the player dies, the weapon is removed and you have to repurchase the item. I spent a little while figuring out what i need to do, and i came to the idea to clone an item from ServerStorage into a specific players StarterGear folder; Can anyone help with this? Feel free to explain as if i'm 5
COMMUNITY QUESTION
how do you clone an item from ServerStorage into the players backpack?
1 answer
local copy = youritem:Clone()
copy.Parent = player.StarterGear -- you need to define player in your script, I'll leave that up to you, but as it is GUI there should be no problem
This should work.
2 comments
0
How would I assign a specific weapon to the youritem variable? my problem now is that i dont know how to pinpoint what weapon the user has bought.
0
well, just edit the shop script to clone the item into startergear and backpack at the same time
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Where is your code that gives players an item when they buy it? Why cant you use the same code when they respawn?