Sign not being disabled from backpack

In StarterPack, I have “Sign” and “GoldSign”. When the player joins, it checks if they have the gamepass for the golden sign, and if they do, the normal sign is disabled. Meaning if they don’t have the gamepass, the golden sign gets disabled. However, this doesn’t work. I don’t get any errors, it’s just doesn’t work.

Script (inside ServerScriptService)

local gps = game:GetService("MarketplaceService")

game.Players.PlayerAdded:Connect(function(player)
	if gps:UserOwnsGamePassAsync(player.UserId, 16248758) then
		player.Backpack.Sign.Enabled = false
	else
		player.Backpack.GoldSign.Enabled = false
	end
end)

Maybe try enabling the GoldSign when the Player joins? Like so:

player.Backpack.GoldSign.Enabled = true

Also, use print statements to debug.

What are you trying to do exactly? Remove the signs from their backpack if they own a gamepass or not?

Hm, now it’s saying that there’s no GoldSign in the player’s backpack, but there clearly is.image

If they own the gamepass, they get the gold sign and nothing else, if they don’t own the gamepass, they get the normal sign but nothing else.

Trying using WaitForChild maybe?

Try this out?

local gps = game:GetService("MarketplaceService")

game.Players.PlayerAdded:Connect(function(player)
	if gps:UserOwnsGamePassAsync(player.UserId, 16248758) then
		player.Backpack.Sign:Destroy()
		player.StarterPack.Sign:Destroy()
	else
		player.Backpack.GoldSign:Destroy()
		player.StarterPack.GoldSign:Destroy()
	end
end)

image

Forgot to add a WaitForChild on them

local gps = game:GetService("MarketplaceService")

game.Players.PlayerAdded:Connect(function(player)
	if gps:UserOwnsGamePassAsync(player.UserId, 16248758) then
		player.Backpack:WaitForChild("Sign"):Destroy()
		player.StarterPack:WaitForChild("Sign"):Destroy()
	else
		player.Backpack:WaitForChild("GoldSign"):Destroy()
		player.StarterPack:WaitForChild("GoldSign"):Destroy()
	end
end)

image

Wait can’t you just clone the tool?

Put the tools/signs in replicatedstorage and do this

local gps = game:GetService("MarketplaceService")

local rs = game:GetService("ReplicatedStorage")

local sign = rs.Sign
local goldsign = rs.GoldSign

game.Players.PlayerAdded:Connect(function(player)
	if gps:UserOwnsGamePassAsync(player.UserId, 16248758) then
		goldsign:Clone().Parent = player.Backpack
		goldsign:Clone().Parent = player.StarterGear
	else
		sign:Clone().Parent = player.Backpack
		sign:Clone().Parent = player.StarterGear
	end
end)

image

Show me those 2 scripts, probably needs a WaitForChild

Just found an error in the ChangeSignText script, works fine now.

GiveSign Script:

local gps = game:GetService("MarketplaceService")

local rs = game:GetService("ReplicatedStorage")

local sign = rs.Sign
local goldsign = rs.GoldSign

game.Players.PlayerAdded:Connect(function(player)
	if gps:UserOwnsGamePassAsync(player.UserId, 16248758) then
		goldsign:Clone().Parent = player.Backpack
		goldsign:Clone().Parent = player.StarterPack
	else
		sign:Clone().Parent = player.Backpack
		sign:Clone().Parent = player.StarterPack
	end
end)

My bad, it’s StarterGear not StarterPack

1 Like

Works perfectly!! Thanks for your help!!

1 Like

Anytime! If you have anymore issues don’t be afraid to make another post!

1 Like