When I hold SHIFT My animation plays smoothly, but when I jump it stops. How do I prevent that?
wait(2) repeat wait() until game.Players.LocalPlayer player = game.Players.LocalPlayer character = player.Character if not character then character = player.CharacterAdded:wait() end Mouse = player:GetMouse() humanoid = character:WaitForChild("Humanoid") s = humanoid:LoadAnimation(game.StarterPack.WRunAnimScrip.Animation) Mouse.KeyDown:connect(function(key) key = string.lower(key) if string.byte(key) == 48 and game.Players.LocalPlayer.TeamColor == BrickColor.new('Bright blue') then s:Play() humanoid.WalkSpeed = 50 end end) Mouse.KeyUp:connect(function(key) key = string.lower(key) if string.byte(key) == 48 and game.Players.LocalPlayer.TeamColor == BrickColor.new('Bright blue') then s:Stop() humanoid.WalkSpeed = 16 end end)
Well, There's One Theory For This To Stop This From Happening...
Well, there is a solution to this, by disabling jump while the animation is playing.
The Code
It's a function to disable it, however, due to the concept of this question, I'm not gonna create the script for you. Here's an example on how this would work, by disabling jump period.
repeat wait() until plr.Character local chr = plr.Character event = chr:WaitForChild('Humanoid').Changed:connect(function() chr.Humanoid.Jump = false end)
Do Note That...
This script could be wrong since I did not make it in studio, but it should give you the idea on how this would work.
GreekGodOfMLG