Im trying to have weapons require a safety function, script is below with attached Gyazo of the scripts location in the model.
http://gyazo.com/481b196c3c4e91e8d1ceb9a9a7d5d9bd
C = script.Parent.Parent.Safety local p = script.Parent:GetChildren() function Toggle() if C.Value == true then open() elseif C.Value == false then close() end end function open() for i = 1, #p do if p[i]:FindFirstChild("Flangs") then p[i].Flangs.Transparency = 0 end end end function close() for i = 1, #p do if p[i]:FindFirstChild("Flangs") then p[i].Flangs.Transparency = 1 end end end C.Changed:connect(Toggle)
Put your Toggle function below the open and close functions ad see if that helps. As it stands now, it won't work due to order of operations in the script - the Toggle function has not visibility to your open and close functions unless they're placed before it.