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

This boolvalue script isn't working properly?

Asked by 9 years ago
open = script.Parent.Main
base = script.Parent.Parent.NightVision
base.Changed:connect(function()
    if base.Value == true then
            open.Visible = true
    end
end)

What is going on? This looks all fine to me, but the frame won't become visible. Any help would be appreciated.

1 answer

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

Your code provided should work but i'll suggest this; The Changed event returns the value that changed. So you can access the change by setting a Parameter, which you will use for the value.

local open = script.Parent.Main
local base = script.Parent.Parent.NightVision
base.Changed:connect(function(change)
        open.Visible = change --if change is true, visible is true.
    end
end)

If this doesn't help then perhaps another part of your script is erroring.. can you provide an output?

0
Nothing is working. I tried different scripts, and believe it or not, the frame property was visible, but it wan't onscreen! What is happening! PyccknnXakep 1225 — 9y
Ad

Answer this question