Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to fix this gamepass gui script?

Asked by 10 years ago

So this script was working PERFECTLY before a ROBLOX update decided to rekt it. It is placed in ServerScriptService in a normal script.

local passId = 145253522 -- Pass ID
permission = {""} -- People that may pass without the game pass

function check(player)
if game:GetService("GamePassService"):PlayerHasPass(player, passId) then
player:WaitForChild("PlayerGui"):WaitForChild("VIPGamePass"):WaitForChild("Open").Visible = true
else
player:WaitForChild("PlayerGui"):WaitForChild("VIPGamePass"):WaitForChild("Open").Visible = false
end
end

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function()
check(plr)
end)
end)

Answer this question