Player's gui not changing visibility?

Hi there! I am experiencing an issue that has me completely stumped. I have no idea what is wrong. So I turned to the forums, in order to find a solution.

Here’s the problem:
I’m trying to make the visibility of a GUI set to true for a player, but it’s not working. It does this when a player spawns in. Here’s what I tried:

So first I tried changing the player’s GUI from a server-script like this:

player.PlayerGui.MorphsGui.MorphsFrame.Visible = true

This didn’t work so I also tried making a remote event that fires to the client from the server:

ServerScript:

MorphGuiEvent:FireClient(player)

LocalScript:

local Players = game:GetService("Players")

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local MorphGuiEvent = ReplicatedStorage:WaitForChild("MorphGuiEvent")

MorphGuiEvent.OnClientEvent:Connect(function(player)
	print("This code was fired") -- It does fire
	Players.LocalPlayer.PlayerGui:WaitForChild("MorphsGui").MorphsFrame.Visible = true -- Does not work
end)

This code still doesn’t make the GUI visible! I’m so confused, so any help will be appreciated!

Also there are no errors for both of the methods I’ve tried.

Thanks.

Did you access the PlayerGui in the game and see if the bool is changing?
It might be working, but the frame’s position could be off the screen.

1 Like

You know I think that might be it. It is changing yet it’s not visible on screen. I will try taking a look into the GUI to see if its off screen.

Thanks it worked, that seemed to be the case!

1 Like