Hey, and thanks for reading in advance.
I’m creating a flamethrower weapon for my buddy’s outbreak-survival lookalike. Problem is, I can’t get the attachment to face towards the mouse so the fire particle angles itself towards the target position.
Is there any way I could rotate the Barrel attachment without moving it from its offset at the end of the gun? Any help is appreciated.
1 Like
I’m not sure as I never really had changed something of an attachment from a script, but there’s a WorldCFrame property in the attachment. You can do something like this:
Attachment.WorldCFrame = CFrame.new(Attachment.Position, Mouse.Hit.Position);
.
(Maybe you can try with Attachment.CFrame
too, which is based on the basepart parent of the attachment. I don’t know which works better for your case),
1 Like