wait(2)
local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
local humanoid = player.Character.Humanoid --Humanoid
local s = humanoid:LoadAnimation(game.StarterPack.PwrSlide.Animation)
Mouse.KeyDown:connect(function(key)
if key:lower() == "c" and humanoid then
s:Play()
humanoid.WalkSpeed = 29
wait(1)
humanoid.WalkSpeed = 14
wait(1)
humanoid.WalkSpeed = 1
s:Stop()
humanoid.WalkSpeed = 16
wait(5)
end
end)
Anyone ever play that new Star Wars game on roblox or NRPG, and when you double tap W, S, A, or D, the player does an animation, but it moves them side-ways or forward? Like, if you double-tap W (On NRPG) you do a front flip, moving you forward. Not just a front flip in place. What I have here is a Slide animation, it speeds up the walkspeed of a player but I don't like it. I was wondering how would I make the player move forward "x" amount of studs (Or whatever). I assume Vector3 is needed in this, right?
NO I do not want people to double-tap C. Just once, and it makes the slide animation while moving the player forward automatically.

3 comments
Where do I put this script? At the bottom of my script?
It's the function that makes the character slide. Put it at the top of the script, but below where 'char' is defined. Make the KeyDown event call 'slide()' when the proper key is pressed.
Could I just use CFrame or Vector3? Because this is a bit complex, I'm not a full-fledged scripter yet.