Gui doesnt show when client changes it, only shows when you change it in studio (server)

  1. What do you want to achieve? Keep it simple and clear!
    I want to learn how to fix this issue.
  2. What is the issue? Include screenshots / videos if possible!
    The issue is that by using the simple game.StarterGui.[SCREENGUI].[FRAME].Visible = true doesnt work.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I searched everywhere, literally. And found nothing.

My explorer (startergui):
image

My script (local script):

local playClicked = game.ReplicatedStorage.mainmenuHidden

while true do wait()
	if playClicked.Value == true then
		game.StarterGui.main.Enabled = true
		game.StarterGui.main.Frame.Visible = true
	else
		game.StarterGui.MainMenu.Enabled = true
		game.StarterGui.main.Enabled = false
	end
	local hide = game.ReplicatedStorage.remoteEvents.mapLoading:WaitForChild("hideGuis")
	local show = game.ReplicatedStorage.remoteEvents.mapLoading:WaitForChild("showGuis")
	hide.onClientEvent:Connect(function()
		game.StarterGui.main.Enabled = false
	end)
	show.onClientEvent:Connect(function()
		game.StarterGui.main.Enabled = true
	end)
end

Also this worked before! And then i changed my ui and now it doesnt…

1 Like

Nothing done on the client is replicated to the server unless you use RemoteEvents or Functions.
StarterGui is just basic info, you need to edit PlayerGui.

I believe this is due to something called Filtering Enabled. This is a security measure Roblox has put in place to reduce the ability for exploiters to tamper with the game and other clients.

The way to get around this is using remote events.

Regarding the reason why “it worked before” in the explorer clicking the workspace there’s a property of this named filtering enabled, turning that off allows you to modify the server from the client without using the medium.

Please read this part. If you didnt already.

How would editing StarterGui work?
That won’t replicate to any clients. [hence why it only works in studio]

You need to bind a server script to some remote events so that you can enable it inside of PlayerGui.

1 Like

I meant worked before with FE. I just tried changing the FE property to false and nothing changes

Okay, i guess i will try that…

I’m pretty sure editing it in starterGui is the same thing as editing in playergui

Oh well this did work actually.

StarterGui is basic data. It loads UI elements into PlayerGui when a player joins.
Editing that does nothing until another player joins, if it worked like that remote events wouldn’t have one of their primary uses.

No it isn’t when the game starts everything in starter GUI gets cloned to the playergui so if you change the starter GUI after it’s been cloned nothin will happen to the players GUI

1 Like

Are you detecting clicks by a click detector?

No, i am just changing the visible value whenever the play button on the main menu is clicked.

oooooh, I always thought they were the same

1 Like

then why don’t u do

button.MouseButton1Click:Connect(function()
    --script stuff
end)

Btw i just changed it to script.Parent.main.Frame.Visible = true

2 Likes

what are u trying to do. Pleease explain so I can help

Yeah that works too inside of local scripts, it just needed to be edited on the client.