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

Can you make it when if you shoot, it explodes at where you fire? thanks [closed]

Asked by 4 years ago

Heres what i want to be it:

http://cdn.discordapp.com/attachments/735406102992388107/768533390625734676/unknown.png

Code:

0101  tool = script.Parent
0202  player = game:GetService("Players").LocalPlayer
0303  
0404  tool.Equipped:Connect(function(mouse)
0505      print("Tool equipped!")
0606  
0707      mouse.Button1Down:Connect(function()
0808          print("Mouse clicked!")
0909          tool.GunSound:Play()
1010  
1111          if player.Character.Humanoid.Health > 0 then
1212              local ray = Ray.new(tool.Dispenser.CFrame.p, (mouse.Hit.p - tool.Dispenser.CFrame.p).unit * 600)
1313              local part, position = game.Workspace:FindPartOnRay(ray, player.Character, false, true)
1414  
1515              local beam = Instance.new("Part", game.Workspace)
View all 48 lines...
0
You can't just come here to ask someone to MAKE a script for you without any attempt User#32819 0 — 4y

Closed as Not Constructive by User#32819 and raid6n

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?