Hello! so i am wondering how would you make it so you have a tool and when you click it throws itself at your mouse point and stick to it and have the same orientation as the part it hit. Basically a sticky c4.
I’ve used roblox’s fake C4 gear and edited it but i still cant make it so it sticks to the hit position correctly and set its orientation, This is a video of me using my edited C4! robloxapp-20200826-1945147.wmv (1.9 MB) I’ve tried raycasting and im not really going with Rays and pretty new to it. This is the lua code, runned with client and yet to be server! LocalScript.lua (2.9 KB)
mouse.Target is finding the object the mouse is pointing at so stick them together with a weld so it sticks to moving targets it also needs local plr = game.Players.LocalPlayer local mouse = plr:GetMouse()
Good point, but i still need help making it directly get the orientation of the hitting part simultaneously, like wherever the player is facing something like that.
Name the C4 “Handle” and put it in the tool that throws it then change the orientation of the C4 mesh until it faces the back which you can see on the top right which has the GUI that shows which direction you are facing
I dont understand, what you mean. But i think i figured it out, by making a ray and shooting it by the lookvector and then getting the part it shot at’s orientation, but thanks for helping with this post i do appreciate it very much.