I am trying to script a game where you survive very weird disasters such as hoards of cows or lava floors.
However, it’s quite common for players to lose parts in the game (for example, during a tornado it’s not uncommon for players to lose their arms) and sometimes they lose the ability to move.
However, I have programmed the game in a way that you are rewarded for not resetting - so I am trying to build a one-use gamepass item (by this i mean the player spawns with it if they have the gamepass, and then if they use it, its gone until they respawn) whose purpose is to regenerate the player’s limbs.
Here is my current code.
local tool = script.Parent.Parent tool.Activated:Connect(function() local a = game.Players:FindFirstChild(tool.Parent.Name) a:LoadCharacter() end)
Note that this code is inside of Handle.
Anyway, this technically works but it respawns the player, defeating the whole point of the item.
So what should I do?