How to Reset Tool to Default Tool?

Alright, so I have a game that’s pretty similar to that of Weight Lifting Simulator 3, except there’s this tool system where once you hit a certain strength value, (e.g. 50), your tool will be switched to a newer, better tool.

My game also has a “Rebirth” system, allowing players to reset all their stats (except their Rebirth value) and allows them to start over, but with the ability to gain more strength per click. The only problem is, I’m not sure how to make the Rebirth system replace your current Tool with the first, default tool. I don’t want to clear the whole backpack, as I also have a sword gamepass. I don’t want the sword to be cleared from the inventory, so it’s just the tool that’s supposed to be replaced. Any suggestions that will be able to make this happen?

1 Like

You should post some of the code so that we can better assist you. Right now, it’s very hard for us to even suggest anything because it might be incompatible with how the game is currently set up.

Instead of clearing the whole backpack, iterate over the backpack and just remove tools that are either not the result of a game pass grant or the default tool. Sounds simple enough, no?

Depending on your implementation you may find differences in how you decrement back to the first tool but typically what you want to do is the reverse of how you give tools.

1 Like

This is my rebirth script. I’m not sure what I should add in order for this to reset your current weights tool to the default tool.

	
	if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end
	
	local rebirths = player.leaderstats.Rebirths
	
	if player.leaderstats.Strength.Value >= (math.floor((starterRebirthRequirement + (rebirths.Value) * math.sqrt(5000000)))) then
		
		rebirths.Value = rebirths.Value + 1
		
		player.leaderstats.Strength.Value = 0
		
		player.LoadCharacter()
		
		return true
	else return "NotEnoughStrength"
	end
end