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

How to TweenPart From One side Only and Other Stuff?

Asked by
YODARM 5
3 years ago

Long Story Short: I'm learning to script but i know a little bit of scripting. So I make small codes for Practice. I Made a Mud-Wall Magic Code But with A CoolDown Indicator. The Mud-Wall Increases in size by Tweening but it is tweening on all sides. The Indicator Changes color when CoolDown has not finished but it only seems to change once and not go back to the original color. A Videos For Help

https://www.youtube.com/watch?v=nxZLvoBHJak

Important Code:

local tweenInformation = TweenInfo.new(
1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
0,
false,
0
)
local partInfo = {
    Size = Vector3.new(8.623, 5.755, 2.023);

}

And

cooldownindicator.BackgroundColor3 = Color3.new(194, 194, 194)
cooldownindicator.BorderColor3 = Color3.new(250, 250, 250)
Cooldown = true
wait(10)
cooldownindicator.BackgroundColor3 = Color3.new(125, 125, 125)
cooldownindicator.BorderColor3 = Color3.new(71, 71, 71)
Cooldown = false

Please Help Me!

1 answer

Log in to vote
0
Answered by 3 years ago

Use the Color3.fromRGB() constructor if you are numbers between 0 to 255. The Color3.new() constructor expects a decimal between 0 and 1.

Here is the Color3 API reference for further reference.

Ad

Answer this question