How would I make a part disappear for only one client?

In the game I’m working on, I want to have a system where multiple players can pick up an object, which disappears only for the player that picked it up.

Now, I have attempted to google this, as well as search YouTube, but that always comes up with FilteringEnabled solutions, and the Roblox API says this:
FilteringEnabledDepriciated
So I don’t want to use it. Is there any other way to go about this, or do I simply have to use FilteringEnabled, even though it likely doesn’t work as well anymore?

3 Likes

Use a local script to make it destroy the part only for the localplayer.

5 Likes

I honestly did not think that it would be that simple haha.

One more thing, how would I go about passing an argument through a remoteEvent, as I need the script to know what to destroy.

Take a look at these links. It also provides code examples.

Server to Client

Client to Server

Those don’t necessarily tell me how to pass the arguments, they just tell me that they can be passed. The code samples only show that you can specify the player being communicated with.

EDIT: I’m going to look this up so that you don’t have to answer.

Alright, got it! Thanks for the help!

i dont understand at all what am i meant to insert in the local script?

I’m not going to give you free code. However I will tell you that this script is very simple to accomplish. Use a local script and the transparency property.

1 Like

but how do i do it for 1 player?

1 Like

Use a local script to do it for one player.