It doesn't show any errors with the local script but only the animations do not run.
local plr = game.Players.LocalPlayer local mouse = plr:GetMouse() repeat wait() until plr.Character.Parent == workspace.FlightModel repeat wait()until plr.Character.Parent == workspace mouse.KeyDown:Connect(function(key) key = key:lower() if key == "w" or key == "a" or key == "s" or key == "d" then plr.Character.Animate.fall.FallAnim.AnimationId = "rbxassetid://2269489808" while true do wait(.1) plr.Character.LowerTorso.BodyVelocity.Velocity = Vector3.new(plr.Character.Humanoid.MoveDirection.X * 100, plr.Character.LowerTorso.BodyVelocity.Velocity.y, plr.Character.Humanoid.MoveDirection.Z * 100) end end end) mouse.KeyUp:Connect(function(key) key = key:lower() if key == "w" or key == "a" or key == "s" or key == "d" then plr.Character.Animate.fall.FallAnim.AnimationId = "rbxassetid://2230124960" end end)
mouse.KeyUp
and mouse.KeyDown
are deprecated, use UserInputService
Link to article: http://wiki.roblox.com/index.php?title=API:Class/UserInputService Other articles:http://wiki.roblox.com/index.php?title=API:Class/UserInputService/InputBegan http://wiki.roblox.com/index.php?title=API:Class/UserInputService/InputChanged http://wiki.roblox.com/index.php?title=API:Class/UserInputService/InputEnded
An example how you would use InputBegan (if you are not familiar):
local UIS = game:GetService("UserInputService") UIS.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.E then print("E") end end)
I do not see anything else wrong with your script, try replacing your events with the one I showed, good luck!
(P.s I barely read your script, had no codeblock and was very messy so I assume this shall be the only mistake)