I'm not exactly sure how to word the title so I hope the description and my idea of how it's going work will help. How do I check for more than one value as is equal to true then andif one or more is not then? I would like to run this constantly checking the values. Thank you for the help in advance. I appreciate it.
local BCV = game.Workspace.CP.BC local GuestV = game.Workspace.CP.Guest local TixV = game.Workspace.CP.Tix local cpl = game.Workspace.CPL while true do wait(1) if BC.Value == true and Guest.Value == true and Tix.Value == true then cpl.Fire.Enabled = true elseif --I don't know if there's anything I need to add to check if any of the values are false cpl.Fire.Enabled = false end end end
Well there a two ways of doing this. A long way, and a short way. The long way is more specific than the short way.
Here is the short way
local BCV = game.Workspace.CP.BC local GuestV = game.Workspace.CP.Guest local TixV = game.Workspace.CP.Tix local cpl = game.Workspace.CPL while true do wait(1) if BC.Value == true and Guest.Value == true and Tix.Value == true then cpl.Fire.Enabled = true else cpl.Fire.Enabled = false end end end
Here is the long way
local BCV = game.Workspace.CP.BC local GuestV = game.Workspace.CP.Guest local TixV = game.Workspace.CP.Tix local cpl = game.Workspace.CPL while true do wait(1) if BC.Value == true and Guest.Value == true and Tix.Value == true then cpl.Fire.Enabled = true elseif BC.Value == false or Guest.Value == false or Tix.Value == false then cpl.Fire.Enabled = false end end end
Hope this helped!