|
| 09 Aug 2011 08:48 AM |
This script just won't work here is the output and the script please help!!!
Workspace.Model.Plane.ArmorScript:22: ')' expected near ','
local children = ArmorParts:GetChildren() for i = 1, #children do if children[i].className == "Part" then children[i].Touched:connect(function(h) if h.Name ~= nil then if h.Name == "Nuke" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 200000 elseif h.Name == "BasicLaserRound" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 1000 elseif h.Name == "EliteLaserRound" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 2500 elseif h.Name == "PlasmaLaserRound" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 4000 elseif h.Name == "IonBlastRound" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 10000 elseif h.Name == "BasicRocketRound" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 15000 elseif h.Name == "EliteRocketRound" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 20000 elseif h.Name == "Phaser" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 5000 (h, children[i])end end end)end end
|
|
|
| Report Abuse |
|
|
|
| 09 Aug 2011 08:54 AM |
Try,
local children = ArmorParts:GetChildren() for i = 1, #children do if children[i].className == "Part" then children[i].Touched:connect(function(h) if h.Name ~= nil then if h.Name == "Nuke" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 200000 elseif h.Name == "BasicLaserRound" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 1000 elseif h.Name == "EliteLaserRound" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 2500 elseif h.Name == "PlasmaLaserRound" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 4000 elseif h.Name == "IonBlastRound" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 10000 elseif h.Name == "BasicRocketRound" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 15000 elseif h.Name == "EliteRocketRound" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 20000 elseif h.Name == "Phaser" then script.Parent.Parts.PilotSeat.ArmorLevel = script.Parent.Parts.PilotSeat.ArmorLevel - 5000 (h, children[i]) end end end end end) |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2011 09:20 AM |
| That didn't help and the problem is not with the ends. |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2011 09:23 AM |
Workspace.Model.Plane.ArmorScript:22: ')' expected near ','
Means There needs to be a ) some where by the ends. |
|
|
| Report Abuse |
|
|