Button activated capsule door help

What’s up guys. Recently I’ve been trying to design this cool batman suit capsule from the movie Batman Vs Superman. I’ve looked up some tutorials on how to make this certain part that rotates around in place, but none of them are quite what I’m looking for.

This is what I’ve come up with:
https://gyazo.com/62f26aa831f960fbf9aa72f000d6f7e2
https://gyazo.com/3e14fe8da21547d5351f893f5ccbc947

It’s supposed to work like whenever you click a button the door does this
https://i.gyazo.com/a6e6f2a39644088c99727d24fd8a10cc.mp4

If anyone can help out with maybe the scripting or making the model or even any type of help it’d be much appreciated. Thank you!

3 Likes

I sent a personal message with a model I think you’ll like!

When you click the button, do this:

for i = 1, 45 do
script.Parent.CFrame *= CFrame.Angles(0,math.rad(4),0)
wait()
end
wait(2) -- make longer depending on what you want
for i = 1, 45 do
script.Parent.CFrame *= CFrame.Angles(0,math.rad(4),0)
wait()
end

also i love the examples lol

1 Like

The only issue with just CFrame rotating the Union is that it spins around it’s center, not the center of the circle it’s supposed to spin in.
The model I built @Oliver_Queen takes that into account and uses the HingeConstraint as the pivot point.

1 Like

I would have the main door (union) and weld it to another part which is positioned on the point you want the door to rotate around. CFrame/Tween/Rotate this part instead of the actual union.

1 Like