Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Error with userdata value?

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

2 comments

0

You can't add a Color3 value

0

well how can i make the Color3 go up instead of adding?

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.