i want the animation to play when i press E key
heres the local script
local plr = game.Players.LocalPlayer
local Player = game.Players.LocalPlayer
local UserInputService = game:GetService("UserInputService")
local Character = Player.Character or script.Parent
local key = 'E'
local debounce = true
UserInputService.InputBegan:Connect(function(Input, IsTyping)
if IsTyping then return end
if Input.KeyCode == Enum.KeyCode[key] and debounce == true then
debounce = false
local Animation = Instance.new("Animation")
local Humanoid = Character.Humanoid
local player = game:GetService("Players").LocalPlayer
local Character = player.Character or player.CharacterAdded:Wait()
local RootPart = Character.HumanoidRootPart
plr.Character.Humanoid.WalkSpeed = 0
local BV = Instance.new("BodyVelocity")
BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
BV.Velocity = RootPart.CFrame.lookVector.Unit * 65
BV.Parent = RootPart
wait(1)
BV:Destroy()
debounce = true
plr.Character.Humanoid.WalkSpeed = 16
wait(2)
end
end)
