Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local falling = false
- script.Parent.Humanoid.StateChanged:Connect(function(o,n)
- if n == Enum.HumanoidStateType.Freefall then
- falling = true
- elseif n == Enum.HumanoidStateType.Landed or n == Enum.HumanoidStateType.Running then
- falling = false
- end
- print(n)
- end)
- local function step()
- if not falling then
- local thing = script["step"..math.random(1,5)]:Clone()
- thing.Parent = script.Parent.HumanoidRootPart
- thing:Play()
- thing.TimePosition = 0
- end
- end
- while wait() do
- if script.Parent.HumanoidRootPart.Velocity.magnitude > 4 then
- wait(4/script.Parent.HumanoidRootPart.Velocity.magnitude)
- step()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement