Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How Do I Make A Gui That Only Gamepass Owners Can Toggle (Visible/Invisible)?

Current Script:

local passId = 940221728 local frame = script.Parent.Parent.Parent:WaitForChild('Frame') script.Parent.MouseButton1Click:connect(function() frame.Visible = not frame.Visible end)

1 comment

0

Use code blocks, man.

1 answer

game.Players.PlayerAdded:connect(function(plr)
	if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, 940221728) then
		--From here you know they have the gamepass and can make it visible
	else
		--From here you know they don't have the gamepass and can make it invisible
	end
end)

3 comments

0

I Think I Understand This.. It'd Be Like local gui = (whatever) then gui.Visible = true//false?

0

Wow, a one month delay to respond to an answer?

0

cab you actually stop commenting if you're not gonna help? Honestly, shut up please.

This discussion is preserved as it was. New answers, comments, and votes are closed.