Im trying to make it so when I press R I throw a knife, and after a second another knife regenerates in my hands (attached to the camera). I have tried cloning it but I can’t find another block to attach it to? also it would help to know how to teleport objects to other existing objects.
- Search this forum for posts on cloning, if you need support with that
- To attach an object to the camera using CoBlocks, you need CoBlocks to be enabled on the Camera
- You can attach an object to the camera using an Advanced CoBlock - add child object to object in Items > Modify
- In order to have the knife return to the same place every time, I suggest you save the position of the knife in a variable at the start of your code.
- Teleporting an object to another object is simply setting the position of an object - you can use Advanced CoBlocks in Transform > Position, Data > Values, and Operators > Math to achieve this.
Hope that helps!
Here is a little trick.
- Attach a knife object to the camera
- Change its opacity to 0%
- Clone it then change the opacity of the clone to 100%
- Re-do the same thing again.
I hope it helps. Good luck.
Yep - so many ways to achieve what you’re wanting @Rowan_Ackerman - that’s the cool thing about coding!