I wanted to make a copy of my game as my group game so I went to my game and published it as a new group game. By doing that, I had to add this gamepass again and it has a different ID. I replaced the ID in the script. But, when I play the game, when I click on the gui button, the old gamepass shows up, not the new gamepass which I added for the group game. Also, I am editing the group game. To sum up, the new gamepass I added for the duplicated version of the game is overwritten by the old gamepass although I already replaced old gamepass's ID from the script with the new one.

The old gamepass ID: 8409154

New gamepass ID: 8531408

More proofs:

Group game with the gamepass: https://www.roblox.com/games/4776936743/GRAPES Old game: https://www.roblox.com/games/4702712294/GRAPES

Script:

local passid = 8531408
local serverScript = script.Parent
local speaker
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)

 while true do
speaker = chatService:GetSpeaker(player.Name)
if speaker~= nil then 
break
end
wait(1)
end
if player.UserId == 424798787 then
	speaker:SetExtraData("Tags",{{TagText = "DEV",TagColor = script.Tags.DEVColor.Value}})
	speaker:SetExtraData("ChatColor",Color3.fromRGB(170, 255, 255))
elseif 
     game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,passid) then
		
			
speaker:SetExtraData("Tags",{{TagText = "????VIP????",TagColor = script.Tags.TagColor.Value}})
	
	speaker:SetExtraData("NameColor",script.NameColor.Value)
                    speaker:SetExtraData("ChatColor",script.ChatColor.Value)
end
end)
end)

chatService = require(serverScript:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))

The script is located in ServerScriptService.

2 comments

0

Can you post your script?

0

Sure thing.