So my first one was this
if k == "b" then
char.Torso.Anchored = true
char.Humanoid.WalkSpeed = 0
coroutine.resume(coroutine.create(function()
for i=0,0.2,0.08 do
wait()
char.Torso.CFrame = char.Torso.CFrame * CFrame.new(0,180*i,math.rad(340*i))
end
end))
coroutine.resume(coroutine.create(function()
for i=0,0.5,0.08 do
wait()
char.Torso.CFrame = char.Torso.CFrame * CFrame.Angles(math.rad(180*i),0,0)
end
end))
wait(0.25)
char.Torso.Anchored = false
char.Humanoid.WalkSpeed = 20
Then my second one I tried to reverse it like this but it does not work it still goes the other way.
elseif k == "f" then
char.Torso.Anchored = true
char.Humanoid.WalkSpeed = 0
coroutine.resume(coroutine.create(function()
for i=0.2,0,-0.08 do
wait()
char.Torso.CFrame = char.Torso.CFrame * CFrame.new(0,180*i,math.rad(340*i))
end
end))
coroutine.resume(coroutine.create(function()
for i=0.5,0,-0.08 do
wait()
char.Torso.CFrame = char.Torso.CFrame * CFrame.Angles(math.rad(180*i),0,0)
end
end))
wait(0.25)
char.Torso.Anchored = false
char.Humanoid.WalkSpeed = 20
I am simply trying to reverse the second one but the method I used did not work..

1 comment
Ah, and by the way, the first code is a back flip, the first for loop making you go in the air, and the second one making you actualy do the flip. :p I will try what you said( and because for loops as small as decimals are allot smoother for animation, and math.rad is fairly easy to work with).