I have 3 fan buttons, and when I press one the other one needs to be disabled. I can’t just color it, because I’m also keeping track of which fan is enabled rn.
When I tried pressing the other button, it just gave me this in output:
Nothing 2nd - Server
Nothing 2nd - Server
local rs = game:GetService("ReplicatedStorage")
script.Parent.ClickDetector.MouseClick:Connect(function()
if script.Parent.BrickColor == BrickColor.new("Cool yellow") then
script.Parent.Material = Enum.Material.Neon
script.Parent.BrickColor = BrickColor.new("CGA brown")
wait(.2)
rs.ReactorValues.Reactor.Fans.f1.Value = "2"
else
warn("Nothing 1st")
end
end)
rs.ReactorValues.Reactor.Fans.f1:GetPropertyChangedSignal("Value"):Connect(function()
if rs.ReactorValues.Reactor.Fans.f1.Value == "1" or rs.ReactorValues.Reactor.Fans.f1.Value == "3" then
script.Parent.Material = Enum.Material.SmoothPlastic
script.Parent.BrickColor = BrickColor.new("Cool yellow")
else
warn("Nothing 2nd")
end
end)
How do I fix it?