Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can You "Tween" Objects?

All right, I know that you can use the :Tweening() method for GUIs, to create a fluid movement with little coding, but is there a way to do this with objects, such as bricks? Essentially, I want to create a door that opens as a hinged door would when you push a button. Is there any method to doing this, other than setting the position several times?

1 answer

Subtract/add the position by a set number repeatedly, so:

Part = workspace.Part
move = CFrame.new(1,0,0)
repeat
Part.CFrame = CFrame*move
wait(.5)
until Part.Position = Vector3.new(5,0,0)

Something like that.

This discussion is preserved as it was. New answers, comments, and votes are closed.