this function is weird asf, works like 20/100 chance idk
hum.StateChanged:Connect(function(_, newState)
if newState == Enum.HumanoidStateType.Jumping and not soundDebounce then
print("first")
soundDebounce = true
local jumpSoundName = jumpSounds[lastMaterial] or jumpSounds["Neutral"]
local jumpSound = materials:FindFirstChild(jumpSoundName)
print(lastMaterial)
task.wait(0.005)
if jumpSound then
makepartasound(jumpSound)
else
wait("what")
end
isJumping = true
task.wait(0.1)
soundDebounce = false
elseif newState == Enum.HumanoidStateType.Landed and isJumping and not soundDebounce then
soundDebounce = true
local landSoundName = landingSounds[lastMaterial] or landingSounds["Neutral"]
local landSound = materials:FindFirstChild(landSoundName)
task.wait(0.005)
print(lastMaterial)
if landSound then
makepartasound(landSound)
else
wait("what")
end
isJumping = false
task.wait(0.1)
soundDebounce = false
end
end)
i think it cause newstate, statechanged, but idk how to change it.