Adding or subtracting 0.1 from an original value of 0.5 leaves a decimal remainder. My code is attempting to rotate a nifty dial with the addition or subtraction of sound volume, yet I’ve ran into a seemingly impossible situation.
Not much to expand on, if I’m being honest.
જ⁀➴
plus.MouseButton1Click:Connect(function()
if songSelection.Volume < 1 then
print(songSelection.Volume)
songSelection.Volume = songSelection.Volume + 0.10
dial.Rotation = dial.Rotation + 28
end
end)
minus.MouseButton1Click:Connect(function()
if songSelection.Volume > 0 then
print(songSelection.Volume)
songSelection.Volume = songSelection.Volume - 0.10
dial.Rotation = dial.Rotation - 28
end
end)
જ⁀➴
Post Scriptum
Once implementing math.clamp(), the code works wonders. Still curious though, unless it is only a flaw in the system.
౨ৎ
With appreciation,
vamp