Some time ago I asked about how to rotate 2 sides at the same time, it worked when I used it in just ONE block
brick = Instance.new("Part", game.Workspace)
brick.Name = "Hello"
brick.Size = Vector3.new(4,4,6)
brick.Position = Vector3.new(1, 28.9, 1)
brick.Anchored = true
for Num = 1, 360/0.2 do
brick.Rotation = brick.Rotation + Vector3.new(0.2, 0.0, 0)
wait(0.05)
end --[ This is a *For* loop, for loops can be used in many ways, as they stop once "Num" reaches the second number (which I have put as division (360/0.2), once Num reaches the limit specified, the loop will stop and your brick should have rotated one full 360 degree turn. ]
--With that in mind, if you want the brick to rotate infinitely, just do:
It worked for me when I used it in one block but now I did this
brick = game.Workspace.Missile
brick.Name = "Missile 2"
local startTime = tick()
local elapsedTime = 0
local rotTime = 90 -- in seconds
-- This is equivalent to (360/.02)*.05
local desiredRot = Vector3.new(140, 360, 0) -- This is how much the block will rotate about each axis over the 'rotTime'
while elapsedTime < rotTime do
elapsedTime = tick() - startTime
if elapsedTime > rotTime then
elapsedTime = rotTime -- so that it doesn't go over.
end
brick.Rotation = desiredRot*(elapsedTime/rotTime)
wait()
end
(Missile is a model not a single part) And it stopped working, it doesn't work because is a model or what?
