I have a script that should make it so that if you own a gamepass it makes it so you can see a button on GUI that it by default invisible.
local passId = 646971612 game.Players.PlayerAdded:connect(function(plr) if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, passId) then plr.PlayerGui.ChangeColor.Disco.Visible = true end end)
it works in studio but when I run it in game it doesn't work and I get "ChangeColor is not a valid member of PlayerGui". I am sure it is in there so I am guessing that it has something to do with having FE on? I reread the blog post on stuff working in studio but not in game but nothing helped me. I really don't know what to do so...
Edit: the script is a server script
Yes, this is due to FilteringEnabled barring the server from directly modifying objects on the client. You could do this inside of the button itself :)
local plr = game.Players.LocalPlayer; local button = script.Parent; local market = game:GetService("MarketplaceService"); local id = 646971612; button.Visible = market:PlayerOwnsAsset(plr,id);