My GUI works/operates fine in studio mode but in play mode it is not working correctly. my GUI consists of a clickable screenGUI button that will bring up a much bigger GUI. In play mode, the first clickable screenGUI appears on my screen, however I am unable to click on it. I can click on it in STUDIO mode. Here is my code.
This script clones the "ScreenGUI" which is in ServerStorage to PlayerGUI in each player
game.Players.PlayerAdded:connect(function(plr)
game.ServerStorage.ScreenGui:clone().Parent = plr.PlayerGui
end)
This is the code in my clickable screenGui that works in studio mode but not play mode (it is a LocalScript)
local imageButton = script.Parent
local menu = script.Parent.Parent.Frame
local close = script.Parent.Parent.TextButton
Open = false
imageButton.MouseButton1Click:connect(function()
if Open == false then
Open = true
imageButton.Image = "rbxassetid://"
wait(0.1)
imageButton.Image = "rbxassetid://"
imageButton.Visible = false
menu.Visible = true
close.Visible = true
elseif Open == true then
wait(0.2)
Open = false
end
end)

3 comments
Thank you for the reply. Changing it from MouseButton1Click to MouseButton1Down did not fix the issue, sadly. Any other ideas?
I am getting a bunch of diagnostics in the output view in play mode. I will try to take a look at those and report back
Ahh, one issue I just realized is apparently GUIs can not be in ServerStorage but in ReplicatedStorage (probably having to do with the way roblox handles client/server things).