Advertisement
JuiceCanX

example?

Nov 29th, 2022
1,099
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. local falling = false
  2.  
  3. script.Parent.Humanoid.StateChanged:Connect(function(o,n)
  4.     if n == Enum.HumanoidStateType.Freefall then
  5.         falling = true
  6.     elseif n == Enum.HumanoidStateType.Landed or n == Enum.HumanoidStateType.Running then
  7.         falling = false
  8.     end
  9.     print(n)
  10. end)
  11.  
  12. local function step()
  13.     if not falling then
  14.         local thing = script["step"..math.random(1,5)]:Clone()
  15.         thing.Parent = script.Parent.HumanoidRootPart
  16.         thing:Play()
  17.         thing.TimePosition = 0
  18.     end
  19. end
  20.  
  21. while wait() do
  22.     if script.Parent.HumanoidRootPart.Velocity.magnitude > 4 then
  23.         wait(4/script.Parent.HumanoidRootPart.Velocity.magnitude)
  24.         step()
  25.     end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement