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

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

Asked by 4 years ago
Edited 4 years ago

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

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your 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()
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)} hasanchik 49 — 4y
0
Please put more research and testing into your answers. hasanchik 49 — 4y
0
oof, sorry about that. Should work now Corruptikoo 0 — 4y
0
I don't think this would work still,  because he has 2 equals signs on line 6. Correct me if I am wrong. JesseSong 3916 — 4y
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. chess123mate 5873 — 4y
Ad

Answer this question