So, I'm creating a Kamehameha wave, and when the beam is triggered to fire, both sides of the part expand. How do I fix this?
script.Parent.Charge:Play() for i = 0.57, 2.16, 0.03 do script.Parent.Size = Vector3.new(i,i,i) wait(0.1) end beam = Instance.new("Part", script.Parent.Parent) beam.Name = "Beam" beam.Material = "Neon" beam.BrickColor = BrickColor.new(9,137,207) beam.Size = Vector3.new(0.99,1.77,2) beam.Shape = "Cylinder" beam.Anchored = true beam.Position = script.Parent.Position + Vector3.new(-0.825, 0.040, 0.022) script.Parent.Fire:Play() for i = 0.24, 18.5, 1.2 do beam.Size = Vector3.new(i,1.77,2) wait(0.05) end
the part's position marks the center of the part, meaning if you were to change its size on, lets say a positive X axis, both sides would extend half the specified amount. to fix this, counteract it by moving forwards by half the amount you extended it
--set up the part local brick = Instance.new("Part", workspace) brick.CFrame = CFrame.new(0,25,0) brick.Anchored = true --ACTION for i=0,100,1 do wait() brick.Size = Vector3.new(i,1,1) brick.CFrame = CFrame.new(i/2,25,0) end