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 4 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:

local tService = game:GetService("TweenService")
local tInfo = TweenInfo.new(1)
local textBox = script.Parent.TextBox

while wait(1) do

    local tGoals = {TextColor3 = Color3.new(math.random(0, 255), math.random(0, 255), math.random(0, 255))}
    local tween = tService:Create(textBox, tInfo, tGoals)

    tween:Play()
    print(tGoals["TextColor3"])

end

Any help?

1 answer

Log in to vote
0
Answered by 4 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 — 4y
Ad

Answer this question