Neplioz
(Neplioz)
November 26, 2021, 12:56pm
#1
What do you want to achieve?
Hello, so in my game i have guns (it’s not a gun system from toolbox i scripted it)
In my guns i have like a ray that goes where the bullet is shot but when i move it’s not positioned on the gun, i want the bullet to follow the gun movement.
In my gun tool there is a part this is what i reference for Shoot Part in the image.
What is the issue?
What solutions have you tried so far?
Tried to fix it myself and looked on forums.
If you have any other questions about the gun for you need to help me, you can ask
1 Like
Forummer
(Forummer)
November 26, 2021, 1:01pm
#2
When you create/clone the projectile set its original CFrame to that of the barrel of the gun tool.
1 Like
Neplioz
(Neplioz)
November 26, 2021, 1:03pm
#4
This is the part where it supposed to get out of
And some others
1 Like
Neplioz
(Neplioz)
November 26, 2021, 1:08pm
#5
If you guys want a recording, here it is
robloxapp-20211126-1407434.wmv (1.0 MB)
2 Likes
GFXBIT
(GFXBIT)
November 26, 2021, 1:17pm
#6
You mean you want to make teh bullet fire at certain spot of the gun?
1 Like
Neplioz
(Neplioz)
November 26, 2021, 1:17pm
#7
I want the bullet fire to be always aligned with the front of the gun
2 Likes
GFXBIT
(GFXBIT)
November 26, 2021, 1:18pm
#8
have you tried using Attachment?
1 Like
Neplioz
(Neplioz)
November 26, 2021, 1:18pm
#9
If you looked the recording then you can see that when i move the bullet is not aligned with the gun
1 Like
Neplioz
(Neplioz)
November 26, 2021, 1:18pm
#10
Well my bullet fire is a part will it work with attachment?
2 Likes
GFXBIT
(GFXBIT)
November 26, 2021, 1:19pm
#11
Yes it will.
Raycasted bullet might be laggy.
I think it normal for it to be laggy tho.
Neplioz
(Neplioz)
November 26, 2021, 1:20pm
#12
Ok and how to i position the bullet with the attachment
1 Like
GFXBIT
(GFXBIT)
November 26, 2021, 1:20pm
#13
You want teh gun to fire at Attachment spot?
GFXBIT
(GFXBIT)
November 26, 2021, 1:22pm
#15
Yeah sure!
Here teh instruction
Neplioz
(Neplioz)
November 26, 2021, 1:22pm
#16
This is where i create my bullet btw
GFXBIT
(GFXBIT)
November 26, 2021, 1:24pm
#17
Is Intersection where the Bullot
goes?
GFXBIT
(GFXBIT)
November 26, 2021, 1:27pm
#19
Insert a Attachment in the Handle.
Make a Variable of the Attachment
Exp:
local Attachment = script.Parent.Handle.Attacment
Neplioz
(Neplioz)
November 26, 2021, 1:27pm
#20
Ok i already put an attachment in it
1 Like