Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why this does not work?

Asked by 9 years ago

Sorry for title not sure what to title it. By the way this is for a stove.

local b1 = game.workspace.Button1
local s1 = game.workspace.p2
function onClick()
    wait(0.1)
    if s1.Fire.Heat == 2 then
        s1.Fire.Heat = 0
    else
        s1.Fire.Heat = 2
   end
end
b1.ClickDetector.MouseClick:connect(onClick)

My output shows nothing wrong with the script yet nothing happens when I click it.

Answer this question