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

Why wont my gamepass script work?

I'm trying to make a script which disables one script and enables another if you have own it. This is what I have:

local gamepassID = 162781083
local pp2 = game.Workspace.FreePP
local pp10 = game.Workspace.MorePP

game.Players.PlayerAdded:connect(function(player)
	if game:GetService("GamepassService"):PlayerHasPass(player, gamepassID) then
		print("Has 5x Gamepass")
		pp2.Disabled = true
		pp10.Disabled = false
	else
		print("No 5x Gamepass")
	end
end)

I'm having trouble figuring out why this script won't work, can anyone help?

1 answer

Well, mabey you can use destroy() instead of Disabled? Or mabey, you can use remove() or remove.

1 comment

0

That removed one of the scripts, but then I have to enable the other script still.

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