Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Guis no longer clickable?

Asked by 5 years ago

--To start, I have been ofline for the better part of 9 months, I missed the rthro update and probably several more so the most likely reason this script isn't working is its just out dated but if someone could explain the issue as I have several different menu buttons and shop buttons ill need to update. Also, I am in no way an expert with LUA, everything I know is self taught so most terms other players may recognize, I may not. Finally, this script is meant to run a GUI menu, button is clickable but the script is dead, no response on click at all. Please and thank you.

local frame = script.Parent.Parent.Frame

script.Parent.MouseButton1Click:connect(function()
    if frame.Visible == false then
        frame.Visible = true
    else
        frame.Visible = false
    end 
end)
0
well,2 things, #1, it is recommended to use Activated instead of MouseButton1Click as it is more concise, #2, make sure this is a local script rather than a script, as they dont run on the client (plr and its descendants/character) theking48989987 2147 — 5y
0
also, instead of using if statements, you can simply use a `not` operator theking48989987 2147 — 5y
0
'not' operator? Dezozion 0 — 5y
0
'not' is a logical operator, you can use this when assigning values as not generally means whatever the passed value is not,. Since we're dealing with booleans true is not false, so give us false, vice-versa.: frame.Visible = (not frame.Visible) Ziffixture 6913 — 5y
0
Interesting, could you direct me to a use of this? Not completely sure how to implement that Dezozion 0 — 5y

Answer this question