The GUI frame's "visible" property doesn't change through the script, but print says that it does

So, basically, I have a roblox code that fires an event every time player’s character appears (so every time the player spawns, the event is being fired), and the code in localscript that responds to that event. But the problem is, the print statement in console shows that the “visible” property is being set to true, but in roblox the frame is not visible and the property is false. I have tried doing many things, putting the script inside the StarterPlayerScripts and referencing the frame from LocalPlayer.PlayerGui, right now the script is placed under the frame, and it still doesn’t work.
Here’s the code:

game.ReplicatedStorage.AppearMenu.OnClientEvent:Connect(function()
	script.Parent.Visible = true
	print("Menu visible: " .. tostring(script.Parent.Visible))
end)

In the console there’s absolutely no errors, just this print statement “Menu visible: true” and the “visible” property not being actually changed. Does anyone know what’s the problem here?

1 Like

What is the script parented under? Just to help you double-check.

Is it directly in the PlayerGui?

1 Like

To the frame. I also tried parenting under the StarterPlayerScripts, but it’s the same exact result.

No, I just meant that I also tried writing the path to the frame

Have you tried restarting Studio or testing the game (not in Studio). If those don’t work, maybe try reinstalling Studio.

Are you checking the ui from Players → YourPlayer → PlayerGui → Frame and not StarterGui?

1 Like

My friend tested the game through roblox player, he says that it’s the same for him.

The local script is parented under the frame. That means that the local script will be in the Frame inside of the Player’s PlayerGui. So I’m pretty sure that no the problem.

Are there any other scripts setting the property to false?

Yes, I was checking the UI location inside of the player

Unsure, I’m not in Studio with them so you’re going to have to ask @BroDadi

It might be another script setting the property to false, if not the case, check if the property is true from another script.

No, the only scripts that also change that property are the buttons which are located inside that gui and the code inside of the buttons doesn’t run at the start.

Can you check if it’s true from another script then? Also, a video would be nice since this is a rare problem.

I typed the print command to check if the frame is visible into the console, and it printed out “false”

Maybe just try restarting studio. Honestly that’s what I’ve been telling everyone with weird bugs.

1 Like

My friend was launching this game through the roblox player and still had the same issue

Could you also show the actual frame in Explorer (while testing in studio)?