#:
30 messages · Page 1 of 1 (latest)
you want it to be smoothly with tweenservice
?
first u would want to create the tweenInfo
local tweenInfo = TweenInfo.new(
1, -- Time: The length of the tween in seconds. Here it is set to 1 second.
Enum.EasingStyle.Linear, -- EasingStyle: The style of the easing function which describes the rate of change over time. Here it is set to Linear, meaning the rate of change is constant.
Enum.EasingDirection.Out, -- EasingDirection: The direction of the easing function. Here it is set to Out, meaning the tween eases out, or slows down towards the end.
0, -- RepeatCount: The number of times the tween should repeat. Here it is set to 0, meaning the tween will not repeat.
false, -- Reverses: Whether the tween should reverse direction each time it repeats. Here it is set to false, meaning the tween will not reverse direction when it repeats.
0 -- DelayTime: The delay time in seconds before the tween starts. Here it is set to 0, meaning the tween will start immediately.
)
and then u would create the tween and all that
TweenService can tween everything but ONLY if it used on Instance
you could do something like
local tween = TweenService:Create(v.Button.ButtonColor, TweenInfo, {Color = Color3.fromRGB(R, G, B)})
tween:Play()
Izan provided TweenInfo above
ty but i have an question
i've modified everything
but the movement still ugly
like
the color just popup of nothing
i've changed movement
to circular
still same
look
local player = game.Players.LocalPlayer
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
1.5, -- Time: The length of the tween in seconds. Here it is set to 1.5 seconds.
Enum.EasingStyle.Circular, -- EasingStyle: The style of the easing function which describes the rate of change over time. Here it is set to Circular, meaning the rate of change follows a circular pattern.
Enum.EasingDirection.Out, -- EasingDirection: The direction of the easing function. Here it is set to Out, meaning the tween eases out, or slows down towards the end.
0, -- RepeatCount: The number of times the tween should repeat. Here it is set to 0, meaning the tween will not repeat.
false, -- Reverses: Whether the tween should reverse direction each time it repeats. Here it is set to false, meaning the tween will not reverse direction when it repeats.
2 -- DelayTime: The delay time in seconds before the tween starts. Here it is set to 2 seconds.
)
task.wait(3)
for i, v in pairs(workspace.Buttons:WaitForChild("MultiplierButtons"):GetChildren()) do
if player.cash.Value >= v.Config.Price.Value then
local tween = TweenService:Create(v.Button.ButtonColor, tweenInfo, {Color = Color3.fromRGB(65, 211, 106)})
tween:Play()
else
local tween = TweenService:Create(v.Button.ButtonColor, tweenInfo, {Color = Color3.fromRGB(255, 89, 89)})
tween:Play()
end
end```