Spawning part when other one touches ground

I need you to let me know if there is way to repair thing I said below.

  • Video shows how it looks like when I use ability for the first time:

https://gyazo.com/01bde678d0685115693f58200a19a70c

  • and this is how it looks like when I try to use it next times:

https://gyazo.com/239d8c978e8199ef5b079ce1cf6260b0

Parts that should spawn on ground are spawning above it.

I haven’t tried anything to repair it so far.

Code? We need the code to help.

So the problem is basically how the ice spikes are spawning a bit off of the ground?

One solution I might foresee is applying an offset to those ice spikes taking into account the size of the projectile. If you position it at the center of the icicle thing, then to get it more accurate in relationship to the ground, you’d want to subtract half of the icicle’s Y size from the position of the ice spikes that spawn.

Mainly just figuring out the proper offsets to use so it appears more accurate.

Then again, I don’t really understand your post, so I don’t know if this is what you mean.

So this happens after you use it the second time? Are you properly deleting the parts. Also what form of detection are you using. Ie touched, magnitude, raycast, region3

Yes, it happens after using it second time.
The form of detection i use is touched. What does properly deleting mean? The spikes are being destroyed after touching ground.

Well touched has been known for having delay, so off the bat I would suggest to change it to magnitude or raycasting. As for deleting I would say using game.Debris:AddItem(part,0) would be better, but it could be that you’re not actually destroying all the parts just a few or 1 of them. I would have to see your scripts to offer any more advice as general tips is all anyone could give without seeing the problem at hand.

1 Like

Thank you. I changed it to raycasting and it works well. I used game.Debris:AddItem(…) and it works better too.