Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How would I create a part where the beam touches another part? [closed]

Asked by 7 years ago

Here's the code, I want to make the "Explosion" part wherever the beam part touches the part it hits. Here's the code:

01local tool = script.Parent
02local player = game:GetService("Players").LocalPlayer
03 
04tool.Equipped:connect(function(mouse)
05    print("Tool equipped!")
06 
07    mouse.Button1Down:connect(function()
08        print("Mouse pressed!")
09        local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p - tool.Handle.CFrame.p).unit * 300)
10        local part, position = workspace:FindPartOnRay(ray, player.Character, false, true)
11 
12        local beam = Instance.new("Part", workspace)
13        beam.BrickColor = BrickColor.Yellow()
14        beam.FormFactor = "Custom"
15        beam.Material = "Neon"
View all 59 lines...

Closed as Not Constructive by Goulstem

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?