Need Help With the PlayerToHideFrom SurfaceGui Option

I’m working with the acs 2.0.1 engine but I’ve run into an issue with surface GUI. I’ve made it so that when you toggle your flashlight it also makes a surface GUI visible. However, I want the surface GUI to be visible to everyone but the local player. So I tried this code inside of the ACS_Server located in serverscriptservice:
Screenshot 2022-07-07 123834
but this didn’t end up working. I want to use the PlayerToHideFrom Option SurfaceGui’s Offer unless there’s another way I can hide it from the LocalPlayer.

So then I tried putting a script inside of the surface GUI with this code:
image
and it still didn’t work.

For those wondering this is what the surface GUI with the scripts inside looks like
image
and despite me trying both of these options this is still the outcome:

The Gui is still visible to the LocalPlayer And not hidden.

Maybe it’s because it’s game.Players.LocalPlayer inside of a script?

This didn’t end up working. Any other ideas?

Does it give any errors in the output?

LocalPlayer can not be used in a server script.
In your case, change game.Players.LocalPlayer to the Player parameter.

blind1.PlayerToHideFrom = Player
blind2.PlayerToHideFrom = Player
3 Likes

Thank you so much! I was stumped on that one for a while lol.