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

Why does this GUI's Removing Gamepass Script not work?

What this script is intended to is if you have a gamepass the NewsGui, and Ad (GUI) get destroyed.

would i need to go to the PlayerGui instead?

GPS = game:GetService("GamePassService")
player = game.Players.LocalPlayer
id = 498305418

game.Players.PlayerAdded:connect(function()
	if GPS:PlayerHasPass(player, id) then
		game.StarterGui.NewsGui:Destroy()
		game.StarterGui.Ad:Destroy()
	end
end)

1 answer

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