What am I doing wrong?

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?

Ah no worries, I was just being dumb, really sorry. I should have not did "2" but just 2 instead

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.