SliderModule - scale based slider GUI module

I searched for a slider GUI module for a settings menu however I couldn’t find any and all examples were offset based which is not ok for me because I want a scalable module. So I made one myself:

There’s a very detailed explanation of this module in the GitHub page and there are also an example which you can check out. If I need to preview the features really quick,

  • Scale based system, no offsets were used
  • Really easy to set up and use
  • Currently 3 events for various things about sliders
  • Can display the target value automatically
  • Has support for TextBox editing so players can set custom values between min and max values
  • Supports decimal values
  • Uses new Luau type checking features (strict mode is off, however)
  • Has protection for small decimals (otherwise you can get values like 15.00000001) and uses min-max values for limiting.

Here’s a preview of initialization but you should check the GitHub repo for a much detailed one:

local newSlider = SliderModule.new(slidingBase, sliderMarker, sliderButton, 
{
    min = min,
    max = max,
    snapFactor = snapFactor
}, 
{
    TextBox = valueText
})

If you decide to use it, please submit any issues to the repo instead of the topic.

11 Likes

Small issue. The slider goes off the screen. How do I fix this? Im not the greatest with UI design so Im stumped lol

RobloxStudioBeta_mYkzbqX4BG
RobloxStudioBeta_jDXor69i8N

Anchor point probably. Try setting it to 1, 0 on the slider marker.

1 Like

setting it to 1 almost fixed it, but it moved the marker off screen. So i set it to 0.5 instead and shrunk the Holder frame so that all of the elements would fit in the box. Works flawlessly now! Thanks for the help :slight_smile:

1 Like