Hi there,
As the title says, I scripted a dash script (local script) and made an animation for it. But when I tried it, the dash works but the hands and legs shake uncontrollably, I tried changing the animation priority, but it did not work, Can you suggest me something?
Local Script:
local uis = game:GetService(“UserInputService”)
local rs = game:GetService(“RunService”)
local ts = game:GetService(“TweenService”)
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Whitelist
params.FilterDescendantsInstances = {workspace}
local animations = game.ReplicatedStorage.Animations
local debounce = false
local controls = {
[“Dash”] = Enum.KeyCode.Q
}
local function dash()
local anim = animations.Dash
local v = Instance.new(“BodyVelocity”, char.HumanoidRootPart)
v.MaxForce = Vector3.new(999999, 0, 999999)
v.Velocity = char.HumanoidRootPart.CFrame.LookVector * 50
local animTrack = char.Humanoid.Animator:LoadAnimation(anim)
animTrack:Play()
char.Humanoid.AutoRotate = false
wait(1)
char.Humanoid.AutoRotate = true
animTrack:Stop()
v:Destroy()
debounce = false
end
uis.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.KeyCode == controls[“Dash”] and not debounce then
debounce = true
dash()
end
end)