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

How do you make a box flap open when you click it?

Let's say there's a box with two flaps; one on each side. The flaps are closed [aka the box is closed]. How do you make the box flaps open when you click on them? [I have NO experience in scripting, so please help :x]

1 comment

0

I know how to C-frame already, and I occasionally use welds :P

1 answer

Because you have zero experience with scripting, I don't think it would be profitable for either of us to just give you a "How to make a Box with flaps" tutorial, but rather to point you towards the sort of things you'd need to be able to make such a thing.

Firstly, read the Beginner's Guide to Scripting on the Official Roblox Wiki.

Some ROBLOX-specific things that you'll be interested in are:

  • ClickDetector lets you receive mouse clicks on Part instances

  • Welds let you hold one Part relative to another one (such as a flap and a side of a box)

  • CFrames are used to describe rotation and position in 3 dimensions, such as for positioning flaps on the box

These should get you started, and along the way you can feel free to ask more specific questions about how to get some particular script to work or how to use some particular ROBLOX object! Enjoy!

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