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

Why won't the Background Color of my frame GUI change?

Asked by 3 years ago
Edited by imKirda 3 years ago
UIS.InputBegan:Connect(function(input)
        if input.KeyCode == Enum.KeyCode.Z then
        while wait(1) do
            Backdrop1.BackgroundColor3 = Color3.new(1, 0, 0)
            Backdrop1.BackgroundColor3 = Color3.new(0, 1, 0)
            Backdrop1.BackgroundColor3 = Color3.new(0, 0, 1)
        end
    end
end)
1
Please use a code block. botw_legend 502 — 3y

1 answer

Log in to vote
1
Answered by
stef0206 125
3 years ago

You don't have a wait between the changing of color, so it just jumps directly to the last color you set the backgroundcolor to be, in this case Color3.new(0,0,1). Simply add a wait() between each line where you change the backgroundcolor.

Ad

Answer this question