of     1   

C_Sharper
#227599422Thursday, November 16, 2017 5:18 AM GMT

Hey guys. So you might've already seen my thread regarding how to make a GUI slider. (Like a setting for volume, or etc.) with a min and max position constraint. I finally got it working. BUT I just noticed, depending on how big the window is, aka, if it's minimized or maximized, the slider bars won't slide correctly. I think it's because I used offset to position the slider from the original X position with the MouseMoved event.. :/ Any help would be great. Thanks! local valueTxt,maxTxt,max,theValue = slider.Parent.Value,slider.Parent.Max,slider.Parent.MaxValue,slider.Parent.CurrentValue slider.Parent.MouseMoved:connect(function(x,y) if down then local final = y - 240 local value = (final > 108 and 108 or false) or (final < 0 and 0 or final) slider.Position = UDim2.new(0,0,0,value) local number = math.floor(max.Value - (max.Value * (slider.Position.Y.Offset / 108))) valueTxt.Text = "Value: "..number theValue.Value = number end end)
chimmihc
#227600241Thursday, November 16, 2017 6:01 AM GMT

C_Sharper
#227608352Thursday, November 16, 2017 5:09 PM GMT

Very cool chimm, thanks for sharing that. But for me, it's a little on the complex side regarding the logic of sliding the sliders.. so unfortunately I can't really get anything out of it. :/
AsharKYT
#227608399Thursday, November 16, 2017 5:12 PM GMT

with my experience with slider offsets, they do not really work. You should try the percentage instead of offset
ITBV
#227608570Thursday, November 16, 2017 5:21 PM GMT

Cheers Chim!
C_Sharper
#227609244Thursday, November 16, 2017 5:53 PM GMT

Mayhaps I could use that property from the Camera to assist here. I might mess around with it, thanks for the replies. Although I would appreciate a little more in-depth instruction. :p
C_Sharper
#227613291Thursday, November 16, 2017 8:41 PM GMT

Bump :/
K7Q
#227613456Thursday, November 16, 2017 8:48 PM GMT

dude, why would you use offset, just use scale and divide
C_Sharper
#227613569Thursday, November 16, 2017 8:53 PM GMT

well.. when you say that you're sort of being vague Anywho, thanks for the reply With that being said, I changed my formula so that it sets the Y Scale position of the slider, but it still slides very inconsistently when you change ur window size, because if you noticed this line here.. local final = y - 240 I offset it so the slider lines up with the mouse, and it worked in studio. What might be a good option to achieve this, but not using this strategy?
K7Q
#227613604Thursday, November 16, 2017 8:54 PM GMT

have a empty bar that represents the slider have another bar be the child of that bar bar/emptybar = Scale X
K7Q
#227613659Thursday, November 16, 2017 8:56 PM GMT

btw the child bar will be the slider this method doesnt let the screensize mess anything up BTW
C_Sharper
#227613727Thursday, November 16, 2017 8:58 PM GMT

hmm, I'll mess around with it. Thank you :p

    of     1