Ray not shooting in correct direction

Try flipping this around, and also make sure it’s using the exact same position as the origin point

(TG.PrimaryPart.Position - handle.CFrame.Position).Unit * settings["Bullet_Range"]

Also, if handle is an Attachment, you have to use .WorldCFrame instead since regular .CFrame for Attachments is the offset relative to the part they’re parented to


Also I can’t help but notice some pretty alarming issues with the rest of your code:

This is deprecated. It might break in the future because Roblox no longer supports it

So is this, use workspace:Raycast instead for both of these

Do not instantiate with the parent argument if you care about performance. Reason here. Only assign the parent after you’ve set all the properties

1 Like