Sorry if it’s a little too much but could you explain that?
slider:GetPropertyChangedSignal("Position"):Connect(function()
print((slider.Position.X.Offset / slider.AbsolutePosition.X) * 10)
end)
I’m getting this output which doesn’t make sense.
Summary
Should I convert it to scale or continue using offset?
zQ86
(zQ86)
September 20, 2020, 9:13am
#22
I meant the starter AbsolutePosition as in storing it in a variable.
local StarterPosition = slider.AbsolutePosition
slider:GetPropertyChangedSignal("Position"):Connect(function()
print((slider.AbsolutePosition.X / StarterPosition .X) * 10)
end)
Still not in scaled number after doing that
Summary
zQ86
(zQ86)
September 20, 2020, 9:16am
#24
You’re multiplying it by 10, which is the reason why it’s not “scaled”.
I appreciate your helps but still
Summary
edit: It’s scaled now but not 0-1
zQ86
(zQ86)
September 20, 2020, 9:21am
#26
I would suggest clamping that, like math.clamp(Diff, 0, 1)
.
somehow it doesn’t go higher than 0.4
zQ86
(zQ86)
September 20, 2020, 9:27am
#28
I’m not exactly sure as to why this happens, mostly because I am tired, but there isn’t exactly much I can do since your logic is sort of confusing. I’d suggest checking out other slider examples on the internet and branching your code out from that.
I will try to fix it on my own, thank a lots!
1 Like