How to move a part like in Cuboid?

I’m trying to make a part move like in this gif:
https://gyazo.com/0a41fd0f34f50867c85db94fc98e1538
But I simply don’t know how to do it. I’ve been trying for the past 2 hours and all my attempts so far have failed.

1 Like

use CFrames and code on move - UserInputService

2 Likes

i know how to use cframes and userinputservice and that I need to use them
but my math is just too garbage.

2 Likes

This forum is for requesting help on an existing code or requesting ideas for how to create the script. If you request someone to make a script for you, that’s against rules.

You can use UserInputService and CFrame:Lerp or tweens for it, if you don’t know how, you can watch some tutorials.

2 Likes

not Really bro , it is also for questions like this

3 Likes

For each movement done by the player, you could register what state the block is in, vertical or horizontal then make it move as accordingly. Not a full idea though.

1 Like

Actually Aero is right, it is against the rules to ask someone to make a script for you. Devforums is for support not you getting free scripts outa people.

1 Like

Alternatively to using math, you could use ROBLOX’s built-in physics engine and BodyMovers to literally push and rotate an un-anchored Part.

Good luck.

2 Likes

thats possible but how do I get the part to move up again? and how do I keep it straight when its unanchored?

1 Like