Is it possible to use Resize() and make it dont stops if it hits a part ?
Asked by
7 years ago Edited 7 years ago
I'm working on a game and i created a "Beam" attack. So, to make the beam grow forward, i used Resize(). The only problem, is that i put a script in the beam in which i used .Touched event. Because of that, the beam wont go throught parts (I tried without and it works but when i use .Touched, it does nothing) . How can i make Resize() continue even if it hits a part ?
Event script :
1 | local beam = script.Parent |
2 | beam.Touched:connect( function (part) |
3 | if part.Parent:FindFirstChild( "Humanoid" ) then |
4 | local humanoid = part.Parent:FindFirstChild( "Humanoid" ) |
5 | humanoid:TakeDamage( 10 ) |
Beam Script
1 | local beam = script.Parent |