Help with Tools

Hello again!

I have managed to make a Shop for my game, the shop provides tools for the Players!

The major problem I’m having is that the Players tools are deleted from their Backpack when they die, I have heard of StarterGear but when I used it, the tool was inserted into StarterGear but it wouldn’t pop up into the players backpack, which means you couldn’t use it!

As I said before, the tool was inserted into StarterGear but wouldn’t appear in the Players backpack, here is the script I am currently using:

local proximityPrompt = script.Parent.ProximityPrompt
local ItemsFolder = game.ServerStorage.Items
local CostAmount = 50

proximityPrompt.Triggered:Connect(function(Player)
	if Player.leaderstats.Points.Value >= CostAmount then
		Player.leaderstats.Points.Value = Player.leaderstats.Points.Value - CostAmount
		local Item = ItemsFolder.RegenCoil:Clone()
		Item.Parent = Player.StarterGear
	end
end)

There are no errors in the Output. I am very stumped right now, how can I let players keep their tools when they die?

You could clone the tool into their StarterGear, and that’ll make sure whenever you respawn, you’ll have those items.

NOTE:
You’ll need to clone ones into backpack too

Try this

local proximityPrompt = script.Parent.ProximityPrompt
local ItemsFolder = game.ServerStorage.Items
local CostAmount = 50

proximityPrompt.Triggered:Connect(function(Player)
	if Player.leaderstats.Points.Value >= CostAmount then
		Player.leaderstats.Points.Value -= CostAmount
		local Item1 = ItemsFolder.RegenCoil:Clone()
		Item1.Parent = Player.Backpack
       
        local Item2 = ItemsFolder.RegenCoil:Clone()
		Item2.Parent = Player.StarterGear
	end
end)
1 Like

Thank you!

I haven’t thought of that yet, it works perfectly fine!

1 Like