Advertisement
chromeJ

BeamTutorial

Jun 18th, 2021
765
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local att0 = workspace.Dynamic.Att0
  2. local att1 = workspace.Dynamic.Att1
  3. local radius = 1
  4. local minradius = 1
  5. local maxradius = 5
  6. local direction = 1
  7.  
  8. game:GetService("RunService").RenderStepped:Connect(function(delta)
  9.     radius += 1 * delta * direction
  10.     att0.Position = Vector3.new(0, 0, radius)
  11.     att1.Position = Vector3.new(0, 0, -radius)
  12.     local curve = ((radius*4)/3)
  13.     att0.BeamPos.CurveSize0 = curve
  14.     att0.BeamPos.CurveSize1 = -curve
  15.     att0.BeamNeg.CurveSize0 = -curve
  16.     att0.BeamNeg.CurveSize1 = curve
  17.  
  18.     if radius < minradius or radius > maxradius then
  19.         direction *= -1
  20.     end
  21. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement