#Custom dash animation help

4 messages · Page 1 of 1 (latest)

scenic plover
#

idk how to script a dash with my custom animation

thorny leaf
#

This was a quick and simple code I worked out in a few mins. Make sure to read it and change what I noted. Currently the dash key is just W, change to whatever when you see key mentioned.

`local character = game.Workspace:WaitForChild("YourCharacter") -- Replace "YourCharacter" with your character's name
local humanoid = character:FindFirstChild("Humanoid")

local dashAnimation = humanoid:LoadAnimation(game.Workspace:WaitForChild("DashAnimation")) -- Replace "DashAnimation" with the actual animation name

local inputService = game:GetService("UserInputService")

local isDashing = false

inputService.InputBegan:Connect(function(input, gameProcessed)
if not gameProcessed and input.KeyCode == Enum.KeyCode.W and not isDashing then
isDashing = true
dashAnimation:PlayAnimation()
dashAnimation:AdjustSpeed(2) -- Adjust the speed as needed
dashAnimation.Looped = false
dashAnimation.Stopped:Wait()
isDashing = false
end
end)
`

#

This is non-looping and untested, make sure to double and triple check before you say it doesnt work. Again, dont expect it to be perfect, as I just made it in a few mins and did not test it as I didn't have an animation to link it to.

scenic plover
#

thanks