MasonX890
(MasonX890)
April 2, 2023, 10:43pm
#1
I’m making a gun and I’m using raycasts to shoot, how can I make it, so a little bullet model shoots out of the gun and travels for the length of the raycast?
Make sure to do more research before creating a post. There are plenty on this same question.
Here is one that could help.
It is explained there.
Basically, without that offset, the part would be in the middle. You want its back face to be at the origin.
[image]
The part would be positioned right where the origin is.
Now, that post was using the old raycasting API. I suggest you use the new one now.
-- for more info on these, check out:
-- https://developer.roblox.com/en-us/api-reference/function/WorldRoot/Raycast
-- https://developer.roblox.com/en-us/api-reference/datatype/RaycastParams
local result = workspa…