I'm slightly confused on how to go about raycasting a new ray with a part on it detecting collisions. Like a gun or something else. I can't provide much code, so I'm only asking for developer links.
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
for i = 1,math.huge do
wait()
local pos = mouse.Hit.p -- I used this to detect the mouse in a 3d space when clicked, I'm not sure if it is able to be used here. Please correct me if I am wrong.
ray.new(plr.Character["Left Arm"], pos) -- Here is where I'm confused. I've seen how to do something similar in another question before, but I just do not understand it. I will use "pos" as a placeholder. I also know that "Left Arm" is not accurate.
end
I am grateful for any help in advance!

1 comment
Thank you very much, really appreciate your help!