Dance Speed Scroll Bar GUI | Any Help?

Relating to something like this image. How would it be possible to make a scroll bar that you can use to change the speed of the dance you are currently playing?

I am going about right now with ;

GUI.Frame.x1.MouseButton1Down:Connect(function() -- 1X SPEED
			Sound:Play()
			anim:AdjustSpeed(1) -- Adjust Speed HERE
		end)
		GUI.Frame.x05.MouseButton1Down:Connect(function()  -- 0.5X SPEED
			Sound:Play()
			anim:AdjustSpeed(0.5) -- Adjust Speed HERE
		end)
		GUI.Frame.x2.MouseButton1Down:Connect(function()  -- 2X SPEED
			Sound:Play()
			anim:AdjustSpeed(1.5) -- Adjust Speed HERE
		end)

How would it be possible to make a scroll instead? Any documentation provided would help!

1 Like

I will try to have it if you can do it but give me a gui so that I can do it

1 Like

I think it can be done but doing it in the form of images

1 Like

I get a failure or it does not work for me, try with this speed

local Players = game:GetService('Players')

local player = Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()

local humanoid = char:WaitForChild('Humanoid')
local animator = humanoid:WaitForChild('Animator')

script.Parent.Activated:Connect(function()
	local tracks = animator:GetPlayingAnimationTracks()

	for _, track in pairs(tracks) do
		track:AdjustSpeed(1) -- speed 
	end
end

What do you mean by Activated?

Im just in need of a way fo making a scroll for the GUI.


	for _, track in pairs(tracks) do
		track:AdjustSpeed(1) -- speed 
	end

I understand the idea of this already.

Yeah If there is an error, you pass me the error

And if this helps you to play the music but the bad thing I try to stop when I change dance and not see if it works for you

local Button = script.Parent
local Song = Button.Sound

Button.MouseButton1Down:Connect(function()
    Song:Play() --Is the same as doing Song:play(), just that it's not recommended to do that
end)

Schermafbeelding 2021-05-11 233604
Schermafbeelding 2021-05-11 233534

1 Like

Yes I understand, Ill be working on that next.

Just still curious on how to make, the SCROLL PARt. So players can hold to drag and change the speed instead of click.

if you can do that drag and switch