I know what is causing the error. What the script does: it is supposed to change the Module name to the "currentTemp C" Problem, when the module name changes line 5 won't work because the module name is not wait no more. Could someone help me fix this please. I want line five to change to the currentTemp value. I have no clue on how to do this.

currentTemp=game.Workspace.TemperatureValue.Value

function tempname()
	wait()
	script.Parent.Name = ""..currentTemp.." C"
end

while true do
	wait(1)
	tempname()
end