Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This will not reverse .-. help please?

Asked by 10 years ago
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

1 answer

Log in to vote
0
Answered by 10 years ago
So my first one was this


if k == "b" then
char.Torso.Anchored = true
char.Humanoid.WalkSpeed = 20
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

Try that

0
read through it, thats the first one I wish to reverse the second one. RootDirectory 10 — 10y
Ad

Answer this question