ServerScript for RemoteEvent function won't set LocalPlayer Gui Visible to False

I have this inside a script stored in ServerScriptService called by a RemoteEvent. For some reason It can set Visible to true but can’t set it to false…

	game.Players[name].PlayerGui:WaitForChild("Round").Finished.Visible = true --Works Fine
	game.Players[name].PlayerGui:WaitForChild("Round").Counter.Visible = false --Doesn't work at all
1 Like

Are Finished and Counter RemoteEvents? If not, then what are they?

1 Like

From what I see, they are probably GUI objects instead of a remoteevent.
I think this is placed within a function or somewhat like that.
but, in summary, the code looks weird and so I am confused as well as you.

You are not supposed to access the PlayerGui from a server sided script. If you want to change the visibility of a player’s UI, create a remote event, bind the event to a function which sets the visibility based on the input of the remote event, and fire said remote event from the server side.

1 Like

This is true.

If your accessing it by an server script, it will show up on the server. but not on the client.
If your using server script, it will show up on the server, if your using client, it will show up only for you.

Does output say anything? Is it that it is not False instead of false? Did you check spelling and everything like that?

Yeah, try adding print statements to help you figure out what’s wrong if none of the methods mentioned above work for you.