Independent Threads

Pretty sure my method of doing this is jank at best.

Main function shown above; called on 3 objects. The intended behavior is that all 3 sliders are moveable independent of each other, but for some reason they move at the same time regardless which slider is clicked/dragged. Not sure what I need to do to resolve this issue.

https://gyazo.com/c3c5a36235a366e20ec0ed1be3fc4232

https://gyazo.com/eaba80876e1438d3e992daaa0a9c9f26

It’s because of the scope of your variables, in particular your sliderdown variable. You’re changing its value outside of the function so it’s going to be true for all three of your sliders.

Move your sliderdown variable to be inside of the move_slider function, eg.

function move_slider(button, selectionarea, value, min, max, unit)
    local sliderdown = false
    selectionarea.MouseButton1Down:Connect(function()
    -- ...

Still results in the same issue unfortunately. I’ve narrowed it down, however. The issue occurs with the actual mouse move section of the function. Seems as though it wants to constantly fire for all 3.

Problem solved. Thanks for the help.