Hello!
I’m making a crawl script for my game, however it is not working correctly.
it uses an animation, but I can’t get through gaps.
Gif of what I mean: https://gyazo.com/4417ccfdb9eb4ba067d7c376f33b9d98
Script:
game.ReplicatedStorage.Events.CrawlEvent.OnServerEvent:Connect(function(Player,crawlOrNot)
local Humanoid = workspace:FindFirstChild(Player.Name):WaitForChild('Humanoid')
if crawlOrNot == true then
crawlAnim = Humanoid:LoadAnimation(script:WaitForChild('CrawlAnim'))
print('true')
crawlAnim:Play()
crawlAnim:AdjustSpeed(0)
Humanoid.WalkSpeed = 8
Humanoid.JumpPower = 0
else
print('false')
crawlAnim:Stop()
Humanoid.WalkSpeed = 16
Humanoid.JumpPower = 50
end
Humanoid.Running:Connect(function(speed)
if speed > 0 then
crawlAnim:AdjustSpeed(1)
else
crawlAnim:AdjustSpeed(0)
end
end)
end)
Thanks for any help!