💣
idontgiveaf's fluent gui
  • Fluent Library
    • Example Script
  • Fluent
    • Setup
      • Interface and Save Manager
      • Properties
  • Components
    • Window
      • Tabs
      • Dialog
  • elements
    • Guide
      • Destroying Elements
      • Section
      • Paragraphs
      • Buttons
      • Toggles
      • Sliders
      • Inputs
      • Dropdowns
      • Colorpickers
      • Keybinds
Powered by GitBook
On this page
  1. elements
  2. Guide

Sliders

I might fix how slider's hitbox is so small.

To create a slider, use this.

local Slider = Tabs.Main:AddSlider("Slider", 
{
    Title = "Slider",
    Description = "This is a slider",
    Default = 2,
    Min = 0,
    Max = 5,
    Rounding = 1,
    Callback = function(Value)
        print("Slider was changed:", Value)
    end
})

If you are having issues, you're supposed to replace "Tabs.Main" with your actual tab.

Example: "Tabs.Exploits"

Whatever you put in your Tabs variable, it's what you need.

Change local Slider to a different variable name every time. It can be anything.

Slider (name of slider) is saved in the Options variable.

You can try to remove it, but I've never tried to.

You can get the value anywhere simply by using this: (Put your variable name)

Slider.Value

Or, whatever you put as the name of the toggle.

Options.Slider.Value

Functions

You can check when the slider is changed, but Callback does the same thing.

Slider:OnChanged(function(Value)
    print("Slider changed:", Value)
end)

To set the value of a slider, use this.

Slider:SetValue(3)

If you don't set the right variable name, it won't work.

PreviousTogglesNextInputs

Last updated 7 months ago