How can I do this?

Hi :grin:, I have this bucket and inside it there will be Trunks as well as you can look at the image.

I want to press a ClickDetector a Trunk is added to the Bucket and so on to a limit that I would put on trunks, but I want it to be added the way I am putting it, so far I have no idea how to do it :neutral_face:

I just want the Trunk to be put in the Bucket is the only thing that makes it difficult for me… If someone has some ways on how to do it, if there is a similar tutorial out there that can guide me in doing so it would be very helpful :neutral_face:

I will wait for an answer, thanks for your time! :smiling_face_with_three_hearts:

Psdt: The trunk is a Union :grimacing:

4 Likes

Maybe make all the trunks transparent and have a debounce and loop through each trunk to see if its transparent or not, if not, make it and end the loop!

2 Likes

You can’t add ClickDetectors directly to Models, only to individual Parts. So you’ll have to add a big Part that covers the whole Model, and then add a ClickDetector to that. A Cylinder shape would probably work well for this. You can make it invisible and disable collisions on it so that players won’t notice it. If the bucket needs to be unanchored/ physically simulated, also enable Massless on the cylinder Part.

xRuinedSeven’s suggestion could work. Another approach is to have a counter in the script, and increasing that counter when the click detector is clicked. You can name each trunk ā€œTrunk1ā€, ā€œTrunk2ā€ etc., and set the Transparency of the trunk represented by the counter by using FindFirstChild("Trunk" .. counter)

1 Like

Sounds like you’re experiencing a bug. Works fine for me.

image

6 Likes

Haha nope, just had no idea that was a feature :stuck_out_tongue:

Sorry for posting misleading info