|
| 03 Apr 2016 10:32 AM |
Hey, I am currently creating a gun, and I have begun the creation of raycast bullets, but I ran into a speed bump. I want the raycast to go part by part, creating a new one every 0.1 seconds or so, but after I have created the first bullet, I am having trouble figuring out how to make the next part for the raycast. I create the first part at the location of the gun, and it works fine, what I need to do is make another part at the end of the first bullet, extending the raycast. See what I mean?
If this were the raycast: (Each one of ---- those are parts constructing the ray)
---- This is what I get every time I shoot What I want is this:
---- ---- ---- ---- ---- ---- ---- ---- | <-- Wall/Target
So in as little confusion as possible, I want parts to be created end to end constantly until they hit something, but I have no idea how to make them end to end, only how to make them stack on top of each other.
Sorry if this was confusing, any help is appreciated. |
|
|
| Report Abuse |
|
|
| 03 Apr 2016 02:29 PM |
Maybe not putting the CFrame/Vector3 far apart and then putting a wait or debounce so the player can't shoot again for like 0.5-1 sec?
#code print('I am very bootiful') |
|
|
| Report Abuse |
|
|
| 03 Apr 2016 10:45 PM |
That isn't the issue, in as few words as possible all that I need to do is create a ray of parts end to end as hit detectors. I can create one, but I don't know how to create more than one part end to end in the correct direction.
I can do this: ---
I need to do this: --- --- --- --- --- --- --- --- --- ---|(Destination) |
|
|
| Report Abuse |
|