|
| 25 Sep 2011 02:04 PM |
The script
local Tool = script.Parent;
enabled = true
local fire = Instance.new("Fire") fire.Color = Color3.new(5,5,5)
function fire(p)
local v.Character = Tool.Parent local vPlayer = game.Players:playersFromCharacter(vCharacter)
local missle = Instance.new("Part")
fire:clone().Parent = game.Players.Backpack.M1 Garand.Flash
local spawnPos = pCharacter.PrimaryPart.Position
local PewPew = Tool.Handle:findFirstChild("PewPew")
if (PewPew == nil) then PewPew = Instance.new("Sound") PewPew.Name = "PewPew" PewPew.SoundId = "http://www.roblox.com/asset/?id=1369158" PewPew.Parent = Tool.Handle PewPew.Volume =20 end
spawnPos = spawnPos + (v * 10)
missle.Position = spawnPos missle.Size = Vector3(1,1,1) missle.Velocity = v * 450 missle.BrickColor = BrickColor.new("Really black") missle.Shape = 0 missle.BottomSurface = 0 missle.TopSurface = 0 missle.Name = "Fire" missle.Transperancy = 0
local force = Instance.new("BodyForce") force.force = Vector3.new(0,98,0 force.Parent = missle
local creator_tag = Instance.new("ObjectValue") creator_tag.Value = pPlayer creator_tag.Name = "Creator" creator_tag.Parent = missle
local new_script = script.Parent.LaserBlast:clone() new_script.Disabled = false new_script.Parent = missle
missle.Parent = game.Workspace
PewPew:Play()
end
function gunUpped() Tool.GripForward = Vector3.new(0,.988,-.199) Tool.GripRight = Vector3.new(1,0,0) Tool.GripUp = Vector3.new(0,.196,.981) end
function gunOut() Tool.GripForward = Vector3.new(0,1.2,0) Tool.GripRight = Vector3.new(1.3,0,0) Tool.GripRight = Vector3.new(0,0,1.4) end
function isTurbo(character) return character:FindFirstChild("BoltHelm") ~= nil end
function onActivated() if not enabled then return end
enabled = false
local Character = Tool.Parent local humanoid = character.Humanoid if humanoid == nil then print("humanoid not found") return end
local targetpos = humanoid.TargetPoint local lookAt = (targetPos - character.Head.Position).unit
local reload = 4 --if (isTurbo(character)) then -- reload = .10 -- print("turbo") --end
gunUp() fire(lookAt) wait(reload) gunOut() wait(reload)
enabled = true
end
function onEquipped() Tool.Handle.EquipSound:play() end
script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped)
output Workspace.joshrocks101.M1 Garand.Script:10: unexpected symbol near '.'
|
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 25 Sep 2011 02:18 PM |
Well, this isn't the output problem but you should look at this
force.force = Vector3.new(0,98,0
See something wrong?
|
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Sep 2011 02:26 PM |
"game.Players.Backpack.M1 Garand.Flash"
that too.
game.Players.Backpack["M1 Garand"].Flash |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2011 02:26 PM |
Heres the new output i fixed the other one.
Workspace.joshrocks101.M1 Garand.Script:17: '=' expected near 'local' |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2011 02:43 PM |
I almost have the script working heres the new output.
Workspace.joshrocks101.M1 Garand.Script:45: ')' expected (to close '(' at line 44) near 'force' |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 25 Sep 2011 03:02 PM |
Josh
1. Did you change what I said? Cause I think that's what the output means
2. You spelled transparency wrong. |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2011 03:09 PM |
@miz Yeah and now my output says.
Workspace.joshrocks101.M1Garand.Script:30: attempt to perform arithmetic on global 'v' (a nil value)
|
|
|
| Report Abuse |
|
|
|
| 25 Sep 2011 03:18 PM |
| I got it working, :D Now i just have to find a good gun sound. |
|
|
| Report Abuse |
|
|