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

TextBox's TextColor3 isn't tweening?

Asked by 5 years ago

I'm trying to script a color changing system so a text box can smoothly change its colors. Problem is, the textColor3 isn't changing, and there isn't an error in the output. I used this script:

01local tService = game:GetService("TweenService")
02local tInfo = TweenInfo.new(1)
03local textBox = script.Parent.TextBox
04 
05while wait(1) do
06 
07    local tGoals = {TextColor3 = Color3.new(math.random(0, 255), math.random(0, 255), math.random(0, 255))}
08    local tween = tService:Create(textBox, tInfo, tGoals)
09 
10    tween:Play()
11    print(tGoals["TextColor3"])
12 
13end

Any help?

1 answer

Log in to vote
0
Answered by 5 years ago

Color3.new() is different than Color3.fromRGB() because Color3.new(1,0,0) is the same thing as Color3.fromRGB(255,0,0). So try to swap to that and see what happens.

0
i was about to say same thing megamanyoutuber 25 — 5y
Ad

Answer this question