I’m trying to have a smooth tween when the player drives the car, but it keeps glitching.
-- Max is 55 for 2nd Frame
Configuration.Velocity.Changed:Connect(function(prop)
local setSpeed = math.floor(configuratables.carUnit.convert * Velocity.Value.Magnitude)
CoverUp.Speed.Text = setSpeed
local F1 = MainGauge.CoverUp.Frame1.ImageLabel
local F2 = MainGauge.CoverUp.Frame2.ImageLabel
if F1.UIGradient.Rotation == 0 then
if F2.UIGradient.Rotation > 55 then
F1.UIGradient.Rotation = -180 + setSpeed * 3.6
else
F2.UIGradient.Rotation = (55 / setSpeed) * 3.6
end
end
while task.wait(0.1) do
if F1.UIGradient.Rotation > 0 then
F2.UIGradient.Rotation = (55 / setSpeed) * 3.6
else
F1.UIGradient.Rotation = -180 + setSpeed * 3.6
end
end
-- fireServer("FuelConsumption", setSpeed)
end)