How do I put a bullethole where my RayCast part lands?

So I have a part for my RayCast and I want to position my bullet holes land where my RayCast part lands (because I have drop for my bullets.) I can not figure out how to do that right now because right now the bullet holes end up where ever my mouse position is when I click it and not where my bullet lands (I know I need a bullethole position for it but I don’t know how to position the bullethole to where the RayCast first hits).
If anyone can help me than that would be awesome. - Thanks.

Either clone the bullet hole from a storage and set the position to be where the destination of the raycast is, or instance.new the part.

You clearly didn’t read what I said…

I have read it and came up with solution for you.

https://developer.roblox.com/en-us/search#stq=raycast

I suggest you read up on RayCasts to learn a bit more about them

Try this:

local part = Instance.new("Part")
part.Size = Vector3.new(1,1,1)

part.Position = RaycastResult.Position

How long of a delay? Is it too long?

No, sorry. I fixed the delay but now whenever my mouse position is on the target i wanna hit when I shoot the bullet hole appears before it hits the object.

Please send a video of some sort of this happening.

You are cloning bullets to fire out of a gun?

If you are, do this:

bulletClone.Touched:Connect(function(hit)
if hit then
local part = Instance.new("Part")
part.Size = Vector3.new(1,1,1)

part.Position = RaycastResult.Position
end
end)

Yeah, sorry, I am doing that but I’m not doing “BulletClone.Touched” I am doing “RayCastPart.Touched”
I’ll try that out.

1 Like

Understandable.

You mean you were doing RayCastPart.Touched or are going to?

I am doing that but now I am going to try the bullet hole touched, and yes I do clone the bullet in a serverscript.

EDIT: doing BulletClone.Touched works worse than RayCastPart.Touched
Doing BulletClone.Touched makes the bullethole go lower than the raycast position by like 4 studs.

1 Like

Alright then, I will look into it.

For now though, try tinkering with RayCastPart.Touched.

1 Like

try to clone the part and parent it to workspace and set the bullet hole position’s to the mouse position

Set the bulletholes position to be the rays position then orientate it to be in lined with the normal vector

there is no raycast part on touched there is only part.Touched