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 :
local beam = script.Parent beam.Touched:connect(function(part) if part.Parent:FindFirstChild("Humanoid") then local humanoid = part.Parent:FindFirstChild("Humanoid") humanoid:TakeDamage(10) end end)
Beam Script
local beam = script.Parent for i = 1,25 do beam:Resize(5, 2) wait(0.01) end
Try setting it's CanCollide property off
but that may effect your Touched event
personally I would tween the size instead because collisions won't stop it from growing.