Alright so, I want to do this for a story game, currently how it works is that once a player clicks on the toolgiver, it adds the tool to the player’s backpack and the toolgiver no longer can give the item and it also gets destroyed. But the problem is that if the player with the tool dies or leaves before the tool goes to it’s place, no one can get it again and everyone will lose. But I don’t know how to detect if the tool is no longer in the player’s backpack. (By the way I want the tool giver to respawn in the place it was in, not make the tool itself drop or something like that)
2 Likes
local YourToolName = -- Your Tool Name Here Example : "RPG"
game.Players.PlayerRemoving:Connect(function(plr)
local YourTool = plr.Backpack:FindFirstChild(YourToolName) or plr.Character:FindFirstChild(YourToolName)
if YourTool then
YourTool:Clone().Parent = -- the spot where you have the toolgiver.
end
end)
https://developer.roblox.com/en-us/api-reference/class/StarterGear
Clone it to the player’s ‘StarterGear’ container, that way it’ll persist across deaths.
1 Like