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

How do you to tween the Color3 of a GUI's Bordercolor3?

I'm trying to tween a color3 of my TextLabel's BorderColor3 from Color3.RGB(0,0,0) to Color3.RGB(0,200,0). I've been checking tutorials but none of them are helping me.

1 answer

--First, we get the TweenService
local TweenService = game:GetService("TweenService") 

 --Second, we get our TextLabel and set out goal
local TextLabel = script.Parent 
local Goal = {BorderColor3 = Color3.fromRGB(190,150,20)}

--And lastly,we create our Tween
local TweenSetting = TweenInfo.new(1) 
local Tween = TweenService:Create(TextLabel,TweenSetting,Goal) 

--Now we can play our Tween
Tween:play()

5 comments

0

This does not work. You have to put TextLabel.BorderColor3 = Color3.fromRGB(190,150,20) in a dictinary i think, Also you dont have to specify what you have to change. Only the property. It would look like this:local Goal = {BorderColor3 = Color3.fromRGB(190,150,20)}

0

Please put more research and testing into your answers.

0

oof, sorry about that. Should work now

0

I don't think this would work still,  because he has 2 equals signs on line 6. Correct me if I am wrong.

0

This script works - I just tested it in the command bar. However, the official capitalization is :Play(), not :play(). Line 6 is fine because it is creating a table (where the key BorderColor3 is being given a value) and then that table is being assigned to Goal.

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