How to make a part visible to a specific player without the use of local scripts? (Curious inquiry)

Intro:
Heyo! I recently took a break from Roblox due to university related time constraints. Now that I’m back I decided to challenge myself to do whacky scripting challenges. One of them being: Make a part visible to a specific player without the use of local scripts. I was determined to come up with a solution, no matter how inefficient it might be. But I quickly came to the conclusion that it’s impossible to truly make a part visible to only a specific player without the results replicating to the entire server.

My workaround
Though I did think of a hacky workaround:

The part detects every player's proximity via server script -> If the script determines that other player's aren't around -> Then make the part visible

Conclusion
Sadly, this doesn’t prevent the results from replicating to every player and I could only image how incredibly ineffective (and annoying!) this type of system would be with the part flicking in and out every time undesired players look in it’s direction.

I wouldn’t consider myself to be a very advanced scripter so a small part of me thinks that it still might be possible to change a part’s properties without replication to the server.

I choose to make this post to see if anyone more talented than myself could think of concepts that are more effective than what I thought up!

Before anyone says "Just use a LocalScript."
I’m fully aware that the most effective way to achieve this is by:

local part = game.workspace:WaitForChild("Part")

part.Transparency = 0 
-- LocalScript in PlayerScripts
3 Likes

No, you can’t. That is literally the purpose of having Server Scripts and Client Scripts. Everything done in the server is replicated to all the clients, there is no workaround to this.

You could fire a remote event from a server script and do what you want to do in local, or you could make a local script not changing part’s transparency, but canceling replication, or do something else that is also unnecessarily complicated and absolutely pointless.
But in any case if you want something to happen only on one client, you have to use a local script.

1 Like

That’s why I love doing these whacky challenges, it forces you to rethink what you know and use critical thinking to come up with a solution :slight_smile: thank you for taking the time to leave a response!