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

Another block movement script problem?

Asked by 9 years ago

All I have is basic block movement, but i need rotation?

0
local model = script.Parent local platform = model.Platform local start = model.Start local finish = model.Finish local bodyPosition = platform.BodyPosition while true do bodyPosition.position = start.Position wait(6) bodyPosition.position = finish.Position wait(6) end HackTheUniverse 50 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

First I don't know what you mean by rotation, I assume you mean rotating a block with a script. I will give you examples:

<Example one>

local object = game.Workspace.spinner 
local y = object.Rotation.Y -- These are finding the current angles of rotation
local x = object.Rotation.X
local z = object.Rotation.Z

function turn()
    object.Rotation = Vector3.new(y,x+3,z) --This is turning, or rotating like a compass or a clock
end
wait(5)
turn()
-- This is an example of still rotation or rotating to certain angles

<Example two>

local object = game.Workspace.spinner

function turn()
    object.BodyAngularVelocity.AngularVelocity = Vector3.new(0,50,0)
end
wait(5)
turn() -- In order to do this a basic part(BodyAngularVelocity) will have to be inserted into said part

-- This will turn like a active merry-go-round, it will not stop until told and has no given angle to stop

Now if you are talking about C-framing I can't help you.

Ad

Answer this question