local UIS = game:GetService("UserInputService")
local char = script.Parent
local hum = char:WaitForChild("Humanoid")
local anim = hum:LoadAnimation(script:WaitForChild("Animation"))
local isCrawling = false
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.C then
if not isCrawling then
script.Parent:WaitForChild("iscrouch").Value = true
hum.WalkSpeed -= 10
isCrawling = true
anim:Play()
else
script.Parent:WaitForChild("iscrouch").Value = false
hum.WalkSpeed += 10
anim:Stop()
isCrawling = false
end
end
end)
My script is suppose to do a crouch animation, the animation runs, but the animation should lower the persons humanoid, which it’s not doing.
If you animate the character to go lower you shouldn’t have to adjust the hip height manually. If you’re having animations issues try to set the priority of the animation higher and see if it works. Roblox recently did something to the animations and it’s been buggy.
Use Action2. I had to set my animations to action2 since the new update on animations. Any lower it might have some issues so for now using action2 just to be safe.