I am trying to make is so everytime a value changes a script changes the visibility of a image button. It won't work it does nothing. It is in a local script.
pID=script.Parent.prgrmID.Value
icnID=script.Parent.prgrmID.icnID.Value
if(pID==0 and icnID==0)then
script.Parent.Visible=false
elseif(pID>0 and icnID>0)then
script.Parent.Visible=true
elseif(pID>0 and icnID==0)then
print("ICON NOT FOUND")
script.Parent.prgrmIcon.Image="http://www.roblox.com/asset/?id=413746335"
end
script.Parent.prgrmID.Changed:connect(function()
if(pID==0 and icnID==0)then
script.Parent.Visible=false
elseif(pID>0 and icnID>0)then
script.Parent.Visible=true
elseif(pID>0 and icnID==0)then
print("ICON NOT FOUND")
script.Parent.prgrmIcon.Image="http://www.roblox.com/asset/?id=413746335"
end
end)

1 comment
no answers?