local danceanim = script.Parent.Humanoid:LoadAnimation(script:FindFirstChild("DanceAnim"))
danceanim:Play()
while wait() do
if game.Workspace.Sound.PlaybackLoudness > 1 then
danceanim:AdjustSpeed(workspace.Sound.PlaybackLoudness * 0.006)
end
end
Bass:
local bassanim = script.Parent.Humanoid:LoadAnimation(script:FindFirstChild("BassAnim"))
local bass = script.Bass
while wait() do
if game.Workspace.Sound.PlaybackLoudness > 1 then
bass.Value = workspace.Sound.PlaybackLoudness * 0.0042
if bass.Value >= 2 then
bassanim:Play()
elseif bass.Value <= 1 then
bassanim:Stop()
end
end
end
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:FindFirstChild('Humanoid')
local AnimTrack = Humanoid:LoadAnimation(script.DanceAnim)
local function anim()
while wait(.1) do
if Character then
AnimTrack:Play()
break
end
end
end
task.spawn(anim)
local function idk()
while wait() do
if game.Workspace.Sound.PlaybackLoudness > 1 then
AnimTrack:AdjustSpeed(workspace.Sound.PlaybackLoudness * 0.006)
end
end
end
task.spawn(idk)
task.wait(2)
print('Stopping')
AnimTrack:Stop()
That should work for the Script if possible can you tell me what you’re trying to achieve with the Bass section?
Just wanted to try something I’m not sure why it’s not working on your end in my workspace it seems to be fine, anyways try this and let me know what else it says:
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild('Humanoid')
local AnimTrack = Humanoid:LoadAnimation(script:FindFirstChild('DanceAnim'))
local function anim()
while wait(.1) do
if Character then
AnimTrack:Play()
break
end
end
end
task.spawn(anim)
local function idk()
while wait() do
if game.Workspace.Sound.PlaybackLoudness > 1 then
AnimTrack:AdjustSpeed(workspace.Sound.PlaybackLoudness * 0.006)
end
end
end
task.spawn(idk)
task.wait(2)
print('Stopping')
AnimTrack:Stop()
I’m not sure about the error at the moment, the reason it stops is because of a test I left in the script which is my mistake. here’s the edited one:
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild('Humanoid')
local AnimTrack = Humanoid:LoadAnimation(script:FindFirstChild('DanceAnim'))
local function anim()
while wait(.1) do
if Character then
AnimTrack:Play()
break
end
end
end
task.spawn(anim)
local function idk()
while wait() do
if game.Workspace.Sound.PlaybackLoudness > 1 then
AnimTrack:AdjustSpeed(workspace.Sound.PlaybackLoudness * 0.006)
end
end
end
task.spawn(idk)