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

GamePass Remove Ads Script not working why?

so this is a No Ads GamePass script so it removes a GUI that is filled with ads if you have the gamepass i don't know where the problem is.

I made it so it loads a Loading Screen while removing the GUI's / Joining the game.

id = 498305418

game.Players.PlayerAdded:connect(function(plr)
	wait(3)
	if game:GetService("GamePassService"):PlayerHasPass(plr, id) then
		script.Parent.Parent.Load.Frame2.Visible = true
		wait(1)
		script.Parent.BG:Destroy()
		script.Parent.BG:Destroy()
		wait(2)
		script.Parent.Parent.Load.Frame2.Visible = false
	end
end)

1 answer

✓ Accepted answer

I can't be sure as I don't know what the scripts parent is, but try this(I am assuming BG is your ad GUI) : plr.PlayerGui:FindFirstChild("BG", true):Destroy()

NOTE: This code has recursive on, so for example it can destroy PlayerGui.hi.lol.BG

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