Hello. This is a weird one. I am currently trying to fix a script I wrote, and I have very little idea of why it is not working.
I have a local script that makes a check mark visible, pretty simple. Here is that script:
local Check1 = script.Parent.Parent.Setting1Check
local Button1 = script.Parent
Button1.MouseButton1Click:Connect(function()
Check1.Visible = not Check1.Visible
end)
Here is the 2nd local script. This checks if the check mark is visible:
if script.Parent.Visible == false then
print("It is not visible")
else
print("it is visible")
end
I think the problem is that it changes the visible property locally, but I am not sure. It prints “it is visible” but when I click the button and the check mark goes visible, it doesn’t print like its supposed to do. I do not know the fix for this. Sadly I am on a crappy keyboard right now so I do not have much motivation to figure it out. Anyone got an idea of what is happening?
Something I forgot to mention: It prints “it is visible” but when I click the button and the check mark goes visible, it doesn’t print like its supposed to do
Probably because it only prints once since i dont see any loops or :GetPropertyChangedSignal, or changed… i think your problem is the script is running once, and doesnt run again.
script.Parent:GetPropertyChangedSignal("Visible"):Connect(function()
if script.Parent.Visible == false then
print("It is not visible")
else
print("it is visible")
end
end)
woah, I tried using GetPropertyChangedSignal(). It did not work so I deleted in because why have the script be more advanced then it needs to be. I guess I messed it up, because this works amazing. Thank you!