|
| 02 Aug 2011 04:42 PM |
| Which function do I use to make a gun a single shot instead of auto? |
|
|
| Report Abuse |
|
|
| 02 Aug 2011 04:53 PM |
| Look Up ScarProductions.Its my Alt theres a Gun making Script-kit |
|
|
| Report Abuse |
|
|
| 02 Aug 2011 05:05 PM |
That didn't work. I think this is the part of the script:
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 * 7)
missile.Position = spawnPos missile.Size = Vector3.new(2,1,1) missile.Velocity = v * 1000 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
local shell = Instance.new("Part") shell.CFrame = Tool.Chamber.CFrame * CFrame.fromEulerAnglesXYZ(1.5,0,0) shell.Size = Vector3.new(1,1,1) shell.BrickColor = BrickColor.new(24) shell.BottomSurface = 0 shell.Transparency = 1 shell.TopSurface = 0 shell.Name = "Shell" shell.CanCollide = false shell.Velocity = Tool.Chamber.CFrame.lookVector * 30 + Vector3.new(math.random(-10,10),20,math.random(-10,10)) shell.RotVelocity = Vector3.new(0,0,0)
local shellmesh = Instance.new("SpecialMesh") shellmesh.Scale = Vector3.new(.1,.25,.1) shellmesh.Parent = shell
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(.1,.1,.1) 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 shell.Parent = game.Workspace game:GetService("Debris"):addItem(shell,6)
weld33.C1 = CFrame.new(-0.75, -0.6, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90)) Tool.Flash.Mesh.Scale = Vector3.new(1, 2, 1) Tool.Flash.Transparency = .3 wait(0.006) weld33.C1 = CFrame.new(-0.75, -0.6, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90)) Tool.Flash.Mesh.Scale = Vector3.new(.5, 1.5, .5) Tool.Flash.Transparency = .8 wait(0.006) weld33.C1 = CFrame.new(-0.75, -0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0) weld55.C1 = CFrame.new(-0.35, 1.2, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90)) Tool.Flash.Transparency = 1 end
|
|
|
| Report Abuse |
|