In a gun system im making i’m trying to replace it where it currently deals damage when a part hits a character, but now I’m trying to make so it deals damage using a ray. And a part of the script where it deals damage is well you will see in the script I post.
bullet.Touched:connect(function(hit)
Currently bullet is a part being fired out of the gun.
1 Like
A raycast is not a part instance, therefore it does not have the Touched event.
Then how would I change it to work with rays?
First off, are you using WorldRoot:FindPartOnRayWithIgnoreList(), or WorldRoot:Raycast()?
I don’t know a lot about raycasting, you would have to dumb it down for me.
I know that raycasting fundamentals like what a ray is and I assumed i could use them to deal damage to players. Since my current system where parts deal damage does not work very well…
Sorry.
Feel free to look into Into to Raycasting, WorldRoot:Raycast(), and WorldRoot:FindPartOnRayWithIgnoreList().
Once you take a look at all, get back to me with any questions.
1 Like