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

How to rotate a union with Tween Service?

Asked by 3 years ago
Edited 3 years ago

I tried 2 ways to rotate it, but none worked. Here are my scripts: 1st method:


spawn(function() while true do local tween = tweenService:Create(child, TweenInfo.new(1), {Orientation = union.Orientation + Vector3.new(120, 0, 0)}) tween:Play() tween.Completed:Wait() end end)

2nd method:

spawn(function()
    while true do
        local tween = tweenService:Create(union, TweenInfo.new(1), {CFrame = union.CFrame*CFrame.Angles(120, 0, 0)
        tween:Play()
        tween.Completed:Wait()
        local tween2 = tweenService:Create(union, TweenInfo.new(1), {CFrame = union.CFrame*CFrame.Angles(240, 0, 0)
        tween2:Play()
        tween2.Completed:Wait()
        local tween3 = tweenService:Create(union, TweenInfo.new(1), {CFrame = union.CFrame*CFrame.Angles(360, 0, 0)
        tween3:Play()
        tween3.Completed:Wait()
    end
end)

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

Try this:

spawn(function()
    while true do
        local tween = tweenService:Create(union, TweenInfo.new(1), {Orientation =union.Orientation + Vector3.new(360, 0, 0)
    end
end)
0
:) tuanorn 6 — 3y
Ad

Answer this question