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

i dont get this, why?

I'm trying to make an intro for my game but i dont know how to work it. Explanation: I want the background to change colors softly and smoothly, if you guys can please give me a hand that would great!

for i = 1, 51 do
g = i*5/255 

script.Parent.Background.BackgroundColor3 = Color3.new(255/255, g, 255/255)
wait()
end
for i = 1, 51 do
c = i*5/255 

script.Parent.Background.BackgroundColor3 = Color3.new(255/255, 1, c)
wait()
end

1 comment

0

You never divided g or c by 255 unlike your other Color3 Values

1 answer

✓ Accepted answer

So this is a free model, correct, since you don't know how to use it?

Well, this is the script, because this is unnecessarily confusing:

local back = script.Parent.Background

for i = 1,255 do
	back.BackgroundColor3 = Color3.new(i/255,i/255,i/255)
	wait(.05)
end

wait(1)

for i = 255,1,-1 do
	back.BackgroundColor3 = Color3.new(i/255,i/255,i/255)
	wait(.05)
end

I don't have time to explain, so please don't downvote. I will edit this answer later.

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