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

i dont get this, why?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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

0
You never divided g or c by 255 unlike your other Color3 Values M39a9am3R 3210 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

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.

Ad

Answer this question