ScreenGui.Enabled issues

Greetings dear developers, my current issue would not usually require a devforum post, however I do feel the need to create this post to hear your opinions. So, my problem is, of course, related to the following code:

local trackingDevice = script.Parent
local trackingGui = game.Players.LocalPlayer.PlayerGui:WaitForChild('TrackingInterface')

trackingDevice.Equipped:Connect(function()
	trackingGui.Enabled = true
end)

trackingDevice.Unequipped:Connect(function()
	trackingGui.Enabled = false
end)

105ac599c68a66aa492fdb90ed0e11a7
The apparent issue is that the GUI won’t become enabled when it is equipped. Any thoughts?

I had the same problem, I have no clue what’s up with this.

Thanks for the reply, but this doesn’t work. I’m starting to think it’s related to roblox rather than to my code.

Well you could use remote events and fire client to enable the GUI.


put print statements in these two spots to see if they are going through. If they are, then its probably something with the screenGui. Usually what I do is that I have all my screenGui’s enabled all the time, and to toggle them on or off, I build the UI inside a Frame like the image below.

image

Uhm this could seem stupid but…isn’t in your gui any frame with visible set to false?

1 Like

Seems like it because, the script is perfectly fine.

1 Like

Everything inside the ScreenGui is set to visible.

Go in the actual game and test, if it does not work then its a Roblox problem.

It does not work in the actual game.

The print statements are going through. The GUI object does exist and the output is crystal clear. I believe it’s a ROBLOX issue.

2 Likes

How about making the gui objects visible instead of making the screenGui enabled since the problem is probably not solved yet?