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

How come the frame won't become visible?

Asked by 6 years ago
(Note: this is in a local script)
(Note: Filtered Enabled is on)
(Note: no errors in output)

-- Variables
local optionsGui = script.Parent
local options = optionsGui:WaitForChild("Frame")
local button = optionsGui:WaitForChild("TextButton")
open = false

button.MouseButton1Down:Connect(function(open)
    if open == false then
        button.Text = "C L O S E"
        options.Visible = true
        open = true
    elseif open == true then
        button.Text = "O P T I O N S"
        options.Visible = false
        open = false
    end
end)

0
This wont work as you need Client side and Server Side scripts. You also need to have remote events and functions for it to be FE. The_sandwic 14 — 6y
0
It's because your function is receiving open as an argument which does not equal true nor false...remove the open argument in :Connect(function(open)) and it will work fine Vulkarin 581 — 6y

Answer this question