Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 27 Jun 2016 02:12 PM |
should this work?
cant test it rn :(
local fire = function(velocity,rightweld,leftweld) local tool = game.Workspace.CurrentCamera[currentWeapon] local Impacts = 0 local direction = ((tool.SightEnd.Position-tool.SightStart.Position).unit + Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))/100) local raySet = {} local ignore = {game.Workspace.BulletDump,player.Character} local audio = Instance.new('Sound',tool.Barrel) audio.SoundId = modules[currentWeapon].fireAudio audio:Play() game.Debris:AddItem(audio,audio.TimeLength) repeat if #raySet == 0 then local Ray = Ray.new(tool.Barrel.Position, (tool.Barrel.Position + direction)*velocity) table.insert(raySet,Ray) else local hit,pos = workspace:FindPartOnRayWithIgnoreList(raySet[#raySet],ignore) local Ray = Ray.new(tool.Barrel.Position, pos + (direction + Vector3.new(0,-.01,0))) table.insert(raySet,Ray) end wait() until #raySet >= 50 end
- Isosta |
|
|
| Report Abuse |
|