Hello everyone, so I don't understand why my gamepass's tool dispears when I respawn my character. When I join my game, my tool appears but when I die, nothing. Why ? My script in ServerScriptService:
local Gid = 7835473
local mps = game:GetService("MarketplaceService")
print(12)
game.Players.PlayerAdded:Connect(function(player)
print(1)
if mps:UserOwnsGamePassAsync(player.UserId, Gid) then
print(2)
game.ServerStorage.AdminCard:Clone().Parent = player:WaitForChild("Backpack")
end
end)
game.ReplicatedStorage.Give.OnServerEvent:Connect(function(player)
print(3)
game.ServerStorage.AdminCard:Clone().Parent = player:WaitForChild("Backpack")
end)
My another script in my GUI:
local mps = game:GetService("MarketplaceService")
local id = 7835473
script.Parent.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
mps:PromptGamePassPurchase(player, id)
end)
mps.PromptGamePassPurchaseFinished:Connect(function(player, idG, purchased)
if idG == id and purchased then
game.ReplicatedStorage.Give:FireServer()
end
end)
Thank you in advance !

1 comment
You have to put it on StarterGear if its a object. And if you want to save it, you need to know how to use DataStore. Let me know if you want a script explaining you how to do it. c: