Gamepass tools that disappear when respawning

  1. What do you want to achieve? Hello, so in my game i have gamepass tools but when players respawn they loose it, i tried a system but it don’t work correctly.

  2. What is the issue? I can’t manage to do it.

  3. What solutions have you tried so far? I tried myself and looked on forums.

This is the script :

local Tool1ID = 1111111
local Tool2ID = 2222222

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function()
		if MarketplaceService:UserOwnsGamePassAsync(Player.UserId, Tool1ID) then
			game.ServerStorage.Tools["Tool1"]:Clone().Parent = Player.Backpack
		end

		if MarketplaceService:UserOwnsGamePassAsync(Player.UserId,  Tool2ID) then
			game.ServerStorage.Tools["Tool2"]:Clone().Parent = Player.Backpack
		end
	end)
end)
2 Likes

Try to parent them into the player’s StarterGear.

1 Like

I tried it but the player don’t have the tool when he spawns

1 Like

Have you tried moving the checking part into the PlayerAdded event and not the CharacterAdded?

1 Like

I don’t think so, im gonna try it

1 Like

Also, instead of cloning it directly on 1 line,
Make a variable for the tool and then clone it from there.

I also noticed you didnt provide Character as an argument inside the CharacterAdded event. Try to add it

Try this:



local Tool1ID = 1111111
local Tool2ID = 2222222

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Char)
		if MarketplaceService:UserOwnsGamePassAsync(Player.UserId, Tool1ID) then
			local tool1 = game.ServerStorage.Tools["Tool1"]:Clone 
            tool1.Parent = Player.Backpack
		end

       if MarketplaceService:UserOwnsGamePassAsync(Player.UserId,  Tool2ID) then	
	    local tool2 = game.ServerStorage.Tools["Tool2"]:Clone 
          tool2.Parent = Player.Backpack
       end
   end)
end)
2 Likes

Does it work?

If not, try to print some things out and tell me what happens

1 Like

I didn’t try im gonna tell you when i did, im adding all my tools in it

2 Likes

If you have multiple tools, I would suggest storing them in a table here instead of having multiple variables.

1 Like

Okay, i changed teams and i didn’t got my tools

1 Like

If it didnt work-

Try to clone the tools into their StarterGear but outside of the CharacterAdded. But inside the PlayerAdded.

2 Likes

Also, if you tools have short names, I think you could just simply use FindFirstChild

1 Like

I tried this and i don’t even have the tools

1 Like

Something like:

local clone = ServerStorage:FindFirstChild("Tool1"):Clone()
clone.Parent = Player.Backpack
clone.Parent = Player.StarterGear
1 Like

oh, you can parent a clone to multiple parents ?

1 Like

I saw it working in many cases.

If it doesnt work here, try to make 2 clones for it. Parent one to backpack and the second to StarterGear.

1 Like

i already tried this and it dosen’t work

1 Like

So in your initial code,

The tools are given to you? but not when you respawn?

2 Likes

Here are some posts on this:

https://www.google.com/url?sa=t&source=web&rct=j&url=https://devforum.roblox.com/t/how-to-make-players-tools-not-disappear-after-death/1329543&ved=2ahUKEwinvLLNjbT4AhVf8LsIHSFMC4sQFnoECA8QBQ&usg=AOvVaw2-S6f9lXuASA4UafgRVfZ_

https://www.google.com/url?sa=t&source=web&rct=j&url=https://devforum.roblox.com/t/when-im-died-my-tool-disappears/636615&ved=2ahUKEwinvLLNjbT4AhVf8LsIHSFMC4sQFnoECAcQAQ&usg=AOvVaw2lSQMcKRmbBrV-j3ePX8m4

https://www.google.com/url?sa=t&source=web&rct=j&url=https://devforum.roblox.com/t/tool-is-gone-after-deathreset/473773&ved=2ahUKEwinvLLNjbT4AhVf8LsIHSFMC4sQFnoECCQQAQ&usg=AOvVaw1Eyq68-9eKn6FICGOVN7Zc

https://www.google.com/url?sa=t&source=web&rct=j&url=https://devforum.roblox.com/t/tools-keep-on-disappearing-and-another-bug/1257201&ved=2ahUKEwinvLLNjbT4AhVf8LsIHSFMC4sQFnoECCEQAQ&usg=AOvVaw1nKYwSisj7YKnBa4P9qpFj

1 Like

They say startergear but it dosen’t work

1 Like