I’m making a reactor cooling fan system where the fans stop cooling the core during the startup, after the startup and set the fan speed, this happened.
The video:
The script:
local TopMegafan = game.Workspace.Reactor.MegaFanTop
local BottomMegaFan = game.Workspace.Reactor.MegaFanBottom
local TempChanger = game.ReplicatedStorage.ReactorSystems.TempChanger
local Rise = game.ReplicatedStorage.ReactorSystems.Rise
local Offline = game.ReplicatedStorage.ReactorSystems.Offline
local Generate = game.ReplicatedStorage.ReactorSystems.Generate
while task.wait() do
if TopMegafan.Speed.Value == 0.05 and BottomMegaFan.Speed.Value == 0 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 1
elseif TopMegafan.Speed.Value == 0.05 and BottomMegaFan.Speed.Value == 0 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0 and BottomMegaFan.Speed.Value == 0.05 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 1
elseif TopMegafan.Speed.Value == 0 and BottomMegaFan.Speed.Value == 0.05 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.05 and BottomMegaFan.Speed.Value == 0.05 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 2
elseif TopMegafan.Speed.Value == 0.05 and BottomMegaFan.Speed.Value == 0.05 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.1 and BottomMegaFan.Speed.Value == 0 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 2
elseif TopMegafan.Speed.Value == 0.1 and BottomMegaFan.Speed.Value == 0 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0 and BottomMegaFan.Speed.Value == 0.1 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 2
elseif TopMegafan.Speed.Value == 0 and BottomMegaFan.Speed.Value == 0.1 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.1 and BottomMegaFan.Speed.Value == 0.1 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 4
elseif TopMegafan.Speed.Value == 0.1 and BottomMegaFan.Speed.Value == 0.1 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.15 and BottomMegaFan.Speed.Value == 0 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 3
elseif TopMegafan.Speed.Value == 0.15 and BottomMegaFan.Speed.Value == 0 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0 and BottomMegaFan.Speed.Value == 0.15 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 3
elseif TopMegafan.Speed.Value == 0 and BottomMegaFan.Speed.Value == 0.15 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.15 and BottomMegaFan.Speed.Value == 0.15 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 6
elseif TopMegafan.Speed.Value == 0.15 and BottomMegaFan.Speed.Value == 0.15 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.2 and BottomMegaFan.Speed.Value == 0 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 4
elseif TopMegafan.Speed.Value == 0.2 and BottomMegaFan.Speed.Value == 0 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0 and BottomMegaFan.Speed.Value == 0.2 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 4
elseif TopMegafan.Speed.Value == 0 and BottomMegaFan.Speed.Value == 0.2 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.2 and BottomMegaFan.Speed.Value == 0.2 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 8
elseif TopMegafan.Speed.Value == 0.2 and BottomMegaFan.Speed.Value == 0.2 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.25 and BottomMegaFan.Speed.Value == 0 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 5
elseif TopMegafan.Speed.Value == 0.25 and BottomMegaFan.Speed.Value == 0 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0 and BottomMegaFan.Speed.Value == 0.25 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 5
elseif TopMegafan.Speed.Value == 0 and BottomMegaFan.Speed.Value == 0.25 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.25 and BottomMegaFan.Speed.Value == 0.25 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 10
elseif TopMegafan.Speed.Value == 0.25 and BottomMegaFan.Speed.Value == 0.25 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.2 and BottomMegaFan.Speed.Value == 0.25 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 9
elseif TopMegafan.Speed.Value == 0.2 and BottomMegaFan.Speed.Value == 0.25 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.25 and BottomMegaFan.Speed.Value == 0.2 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 9
elseif TopMegafan.Speed.Value == 0.25 and BottomMegaFan.Speed.Value == 0.2 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.15 and BottomMegaFan.Speed.Value == 0.25 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 8
elseif TopMegafan.Speed.Value == 0.15 and BottomMegaFan.Speed.Value == 0.25 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.25 and BottomMegaFan.Speed.Value == 0.15 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 8
elseif TopMegafan.Speed.Value == 0.25 and BottomMegaFan.Speed.Value == 0.15 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.1 and BottomMegaFan.Speed.Value == 0.25 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 7
elseif TopMegafan.Speed.Value == 0.1 and BottomMegaFan.Speed.Value == 0.25 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.25 and BottomMegaFan.Speed.Value == 0.1 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 7
elseif TopMegafan.Speed.Value == 0.25 and BottomMegaFan.Speed.Value == 0.1 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.05 and BottomMegaFan.Speed.Value == 0.25 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 6
elseif TopMegafan.Speed.Value == 0.05 and BottomMegaFan.Speed.Value == 0.25 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.25 and BottomMegaFan.Speed.Value == 0.05 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 6
elseif TopMegafan.Speed.Value == 0.25 and BottomMegaFan.Speed.Value == 0.05 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.15 and BottomMegaFan.Speed.Value == 0.2 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 7
elseif TopMegafan.Speed.Value == 0.15 and BottomMegaFan.Speed.Value == 0.2 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.2 and BottomMegaFan.Speed.Value == 0.15 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 7
elseif TopMegafan.Speed.Value == 0.2 and BottomMegaFan.Speed.Value == 0.15 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.1 and BottomMegaFan.Speed.Value == 0.2 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 6
elseif TopMegafan.Speed.Value == 0.1 and BottomMegaFan.Speed.Value == 0.2 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.2 and BottomMegaFan.Speed.Value == 0.1 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 6
elseif TopMegafan.Speed.Value == 0.2 and BottomMegaFan.Speed.Value == 0.1 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.05 and BottomMegaFan.Speed.Value == 0.2 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 5
elseif TopMegafan.Speed.Value == 0.05 and BottomMegaFan.Speed.Value == 0.2 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.2 and BottomMegaFan.Speed.Value == 0.05 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 5
elseif TopMegafan.Speed.Value == 0.2 and BottomMegaFan.Speed.Value == 0.05 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.15 and BottomMegaFan.Speed.Value == 0.1 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 5
elseif TopMegafan.Speed.Value == 0.15 and BottomMegaFan.Speed.Value == 0.1 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.1 and BottomMegaFan.Speed.Value == 0.15 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 5
elseif TopMegafan.Speed.Value == 0.1 and BottomMegaFan.Speed.Value == 0.15 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.05 and BottomMegaFan.Speed.Value == 0.15 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 4
elseif TopMegafan.Speed.Value == 0.05 and BottomMegaFan.Speed.Value == 0.15 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.15 and BottomMegaFan.Speed.Value == 0.05 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 4
elseif TopMegafan.Speed.Value == 0.15 and BottomMegaFan.Speed.Value == 0.05 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.05 and BottomMegaFan.Speed.Value == 0.1 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 3
elseif TopMegafan.Speed.Value == 0.05 and BottomMegaFan.Speed.Value == 0.1 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0.1 and BottomMegaFan.Speed.Value == 0.05 and Offline.Value == false and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 3
elseif TopMegafan.Speed.Value == 0.1 and BottomMegaFan.Speed.Value == 0.05 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0 or TopMegafan.Speed.Value > 0 and BottomMegaFan.Speed.Value == 0 or BottomMegaFan.Speed.Value > 0 and Offline.Value == false and Generate.Value == true then
Rise.Value = true
TempChanger.Value = 100
elseif TopMegafan.Speed.Value == 0 or TopMegafan.Speed.Value > 0 and BottomMegaFan.Speed.Value == 0 or BottomMegaFan.Speed.Value > 0 and Offline.Value == true and Generate.Value == true then
Rise.Value = false
TempChanger.Value = 0
end
if TopMegafan.Speed.Value == 0 and BottomMegaFan.Speed.Value == 0 and Offline.Value == false and Generate.Value == false then
Rise.Value = true
TempChanger.Value = 6
elseif TopMegafan.Speed.Value == 0 and BottomMegaFan.Speed.Value == 0 and Offline.Value == true and Generate.Value == false then
Rise.Value = false
TempChanger.Value = 0
end
end
Any help is appreciated, thanks.