Hello developers,
Im currently in the works of making an advanced RBMK reactor simulator with full physics simulation, to do this, i need a certain gauge called ‘Reactor Period’ it displays how long until reactor power doubles (in seconds)
Problem is the numbers on the gauge arent evenly spaced say like the SRM gauge:
This means that the number displayed on the period gauge is not accurate.
How can I get the slider to display 120 here, and same with all numbers going down:
Instead of here:
For additional info, anything above 240s is considered ‘Infinite’
This is the code that updates the gauge:
function UpdatePeriodGauge(Gauge: Model)
local Slider = Gauge.Slider
local startPos = Gauge.Start.Position
local endPos = Gauge.End.Position
local min = Gauge:GetAttribute("Min")
local max = Gauge:GetAttribute("Max")
local Value = math.clamp(Gauge:GetAttribute("Number"), max, min)
local normalized = (Value - min) / (max - min)
local newPos = startPos:Lerp(endPos, normalized)
local Tween = TweenService:Create(Slider, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0), {Position = newPos})
Tween:Play()
end