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)
Try changing MouseButton1Click to MouseButton1Down on Line 06.
Okay, I keep getting "Frame is not a valid member of ScreenGUI" however it is. If you look at my code above, it is correctly referring to the Frame.
Are you missing an end at the end? The first one being for the if statement, the second for the elseif and the third for the function with the closing bracket which I can see you already have..