I'm creating values in a player for easier game use, and the VIP(lines 10-14), bool values aren't being created or turned to true. I own these items and I don't know what is wrong.
local mps = game:GetService("MarketplaceService")
function Validate(Players)
if
Players:IsInGroup(1200769) then
local tag = Instance.new("BoolValue",Players)
tag.Name = "RobloxStaff"
tag.Value = true
elseif
mps:UserOwnsGamePassAsync(Players.UserId, 7222195) then
local tag = Instance.new("BoolValue",Players)
tag.Name = "VIP"
tag.Value = true
elseif
Players:IsInGroup(4475945) then
local tag = Instance.new("BoolValue",Players)
tag.Name = "Fan"
tag.Value = true
elseif
mps:UserOwnsGamePassAsync(Players.UserId, 0) then
local tag = Instance.new("BoolValue",Players)
tag.Name = "GPPACK1"
tag.Value = true
end
end
game.Players.PlayerAdded:Connect(Validate)
for i,Player in pairs(game.Players:GetPlayers()) do
Validate(Player)
end

5 comments
Why don't you just have these values already in a player when a player joins so you don't need to create new ones every single if statement? Then each gamepass check would just turn them false or true.
Also recheck to see if you've got the right gamepass ID
Well I tested your script and it works. I changed the gamepass id to my gamepass and it detects that i have it and created the tag for me. I assume that u dont have the gamepass. You should mayb double check.
This is yet another example of using value objects where a Lua table should be used. ValueObjects were meant for authoring-time configuration, not so you can use a 60+ byte Instance to store a boolean.
@EmilyBendsSpace I'm going to use a model full of StringValues as a table of strings and you can't stop me!