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

How to make parts disappear locally???

I want to make every player with the gamepass "No Advertisements" to stop seeing the AdPanel Part (Not everyone, only the people with the gamepass "No advertisements") Thank you

Here is my code:

nag = true

local part = script.Parent.Adpanel -- Dont change this, Thank you!
local player = game.Players.LocalPlayer -- Please dont change this, Thank you!

if nag == true then
game.Players.PlayerAdded:connect(function(player)
    if game:GetService("GamePassService"):PlayerHasPass(player, id) then 
       --What do i do Here?
    else
       print("A New Player has joined and he/she does not have the anti ads gamepass")
    end
end)
else
print("NAG has been Disabled, to enable it, go to the NAG Settings and set the nag option to true (It is True by default)")
end

3 comments

1

If FilteringEnabled is on, using part:Destroy() should be enough, I think.

1

Turn on FE first

0

You need to enable Filtering by going to the workspace properties and checking Filtering Enabled that should make client side changes stay on the client side. To read more go to this http://wiki.roblox.com/index.php?title=API:Class/Workspace/FilteringEnabled The script that is disabling the ads should be in local script, in some where it can run, like StarterGui

1 answer

✓ Accepted answer

Hello,

What you can do is just enable filtering enabled (go to Workspace and tick the FilteringEnabled box) and then just use part:Remove() it is going to remove it locally.

For more information visit the wiki.

~Frag

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