I have this script (which has snippets from the roblox wiki) which should check if the localplayer has a gamepass, and if he does, it should change the text. However, it doesnt do anything, nor does it error.
local surfgui = game.Workspace.SuitScreen.SuitScreen.Background
function isAuthenticated(player)
return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, 625306888)
end
game.Players.PlayerAdded:connect(function(plr)
game.Workspace:WaitForChild(game.Players.LocalPlayer.Name)
if isAuthenticated(plr) then
surfgui.Purchase.TextButton.Text = "Select!"
end
end) |