Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local start,finish = workspace.Part1,workspace.Part2
- local castRate,castRadius = 12,4;
- for i = 1,castRate do
- local step = i * (360/castRate);
- local _end = (finish.CFrame * CFrame.Angles(0,math.rad(step),0) * CFrame.new(0,0,-castRadius));
- local ray = Ray.new(
- start.CFrame.p,
- (_end.p - start.CFrame.p).unit * 300
- )
- local dist = (start.CFrame.p - _end.p).magnitude;
- local p = Instance.new("Part", workspace);
- p.BrickColor = BrickColor.new("Bright red");
- p.FormFactor = "Custom";
- p.Material = "Neon";
- p.Transparency = 0.25;
- p.Anchored = true;
- p.Locked = true;
- p.CanCollide = false;
- p.Size = Vector3.new(0.3, 0.3, dist);
- p.CFrame = CFrame.new(start.CFrame.p, _end.p) * CFrame.new(0, 0, -dist / 2);
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement