zekey101
|
  |
| Joined: 08 Aug 2011 |
| Total Posts: 2499 |
|
|
| 01 Dec 2013 02:16 PM |
Okay you can play the game but if you shoot every thing crashes. The gun is a 3 shot burst and this is the part of the script that crashes.
function fire(v)
Tool.Handle.Fire:play()
local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter)
local missile = Instance.new("Part")
local spawnPos = vCharacter.PrimaryPart.Position
spawnPos = spawnPos + (v * 8)
missile.Position = spawnPos missile.Size = Vector3.new(1,1,1) missile.Velocity = v * 500 missile.BrickColor = BrickColor.new(26) missile.Shape = 0 missile.BottomSurface = 0 missile.TopSurface = 0 missile.Name = "Bullet" missile.Elasticity = 0 missile.Reflectance = 0 missile.Friction = .9 missile.CanCollide = false
local force = Instance.new("BodyForce") force.force = Vector3.new(0,missile:getMass() * 196,0) force.Parent = missile
local mesh = Instance.new("SpecialMesh") mesh.Scale = Vector3.new(.06,.06,.06) mesh.MeshType = "Sphere" mesh.Parent = missile
local new_script = script.Parent.Bullet:clone() new_script.Disabled = false new_script.Parent = missile
local creator_tag = Instance.new("ObjectValue") creator_tag.Value = vPlayer creator_tag.Name = "creator" creator_tag.Parent = missile missile.Parent = game.Workspace
cam = game.Workspace.CurrentCamera local cam_rot = cam.CoordinateFrame - cam.CoordinateFrame.p local cam_scroll = (cam.CoordinateFrame.p - cam.Focus.p).magnitude local ncf = CFrame.new(cam.Focus.p)*cam_rot*CFrame.fromEulerAnglesXYZ(0.01, -0.01, 0) cam.CoordinateFrame = ncf*CFrame.new(0, 0, cam_scroll) weld33.C1 = CFrame.new(-0.75, -0.7, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-16), 0) weld55.C1 = CFrame.new(0.8, 0, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(275), 1, math.rad(-0)) Tool.Flash.Mesh.Scale = Vector3.new(1.727, 3, 1.727) Tool.Flash.Transparency = .5 Tool.A1.Mesh.Offset = Vector3.new(0, 0.6, 0) canreload = false for i = 1,3 do fire(v) wait(2) Choosy() end end |
|
|
| Report Abuse |
|
Absurdism
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 2568 |
|
|
| 01 Dec 2013 02:17 PM |
for i = 1,3 do fire(v) wait(2) Choosy() end
You're recursively calling the function in itself. |
|
|
| Report Abuse |
|