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

Error with userdata value?

Asked by 8 years ago

Why isn't this working? I always get this error : attempt to perform arithmetic on field 'ImageColor3' (a userdata value)

I don't get it..?

color = script.Parent

while wait() do
    local i = 0
    repeat
        wait(0.2)
        i = i + 1
        script.Parent.ImageColor3 = script.Parent.ImageColor3 + Color3.new(0,0,0+i)
        if i == 10 then break end
    until i == 10
    wait()
    local ii = 10
    repeat
        wait(0.2)
        ii = ii - 1
        script.Parent.ImageColor3 = script.Parent.ImageColor3 + Color3.new(0,0,0+i)
        if ii == 0 then break end
    until ii == 0
end
0
You can't add a Color3 value Shawnyg 4330 — 8y
0
well how can i make the Color3 go up instead of adding? GeezuzFusion 200 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

You would need to add each individual parameter separately. Read over this wiki page to better understand it.

Ad

Answer this question