Hello,
This is possibly the most easy'est question I have ever asked yet I cannot solve it -_-
Workspace.DetectFans:86: attempt to call global 'tempname' (a nil value) is the error message. I just want to know why it isn't working. If I remove the function tempname() it will work fine. Help? It is suppost to change the module name to the currentTemp.
Fan1Value=game.Workspace.FanValues.Fan1Value
Fan2Value=game.Workspace.FanValues.Fan2Value
Fan3Value=game.Workspace.FanValues.Fan3Value
Fan4Value=game.Workspace.FanValues.Fan4Value
Fan5Value=game.Workspace.FanValues.Fan5Value
Temperature=game.Workspace.TemperatureValue
currentTemp = game.Workspace.TemperatureValue.Value
function Fan1On()
if Fan1Value.Value == true then
wait(3)
game.Workspace.TemperatureValue.Value = game.Workspace.TemperatureValue.Value -3
end
function Fan2On()
if Fan2Value.Value == true then
wait(3)
game.Workspace.TemperatureValue.Value = game.Workspace.TemperatureValue.Value -3
end
function Fan3On()
if Fan3Value.Value == true then
wait(3)
game.Workspace.TemperatureValue.Value = game.Workspace.TemperatureValue.Value -3
end
function Fan4On()
if Fan4Value.Value == true then
wait(3)
game.Workspace.TemperatureValue.Value = game.Workspace.TemperatureValue.Value -3
end
function Fan5On()
if Fan5Value.Value == true then
wait(3)
game.Workspace.TemperatureValue.Value = game.Workspace.TemperatureValue.Value -3
end
function Fan1Off()
if Fan1Value.Value == false then
game.Workspace.TemperatureValue.Value = game.Workspace.TemperatureValue.Value +3
wait(3)
end
function Fan2Off()
if Fan2Value.Value == false then
wait(3)
game.Workspace.TemperatureValue.Value = game.Workspace.TemperatureValue.Value +3
end
function Fan3Off()
if Fan3Value.Value == false then
wait(3)
game.Workspace.TemperatureValue.Value = game.Workspace.TemperatureValue.Value +3
end
function Fan4Off()
if Fan4Value.Value == false then
wait(3)
game.Workspace.TemperatureValue.Value = game.Workspace.TemperatureValue.Value +3
end
function Fan5Off()
if Fan5Value.Value == false then
wait(3)
game.Workspace.TemperatureValue.Value = game.Workspace.TemperatureValue.Value +3
end
function tempname()
wait()
game.Workspace.wait.Name = ""..currentTemp.." C"
end
end
end
end
end
end
end
end
end
end
end
while true do
wait(2)
tempname()
Fan1On()
Fan2On()
Fan3On()
Fan4On()
Fan5On()
Fan1Off()
Fan2Off()
Fan3Off()
Fan4Off()
Fan5Off()
end

3 comments
You are calling the function "tempname()" within the function itself. Is that intended? Or did you just miss an end?
Am I? o_o
Does "game.Workspace.wait.Name" exist?