generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Script just won't work. Help please.

Previous Thread :: Next Thread 
WickedErasor is not online. WickedErasor
Joined: 24 Dec 2009
Total Posts: 1375
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
bikerking300 is not online. bikerking300
Joined: 31 Mar 2010
Total Posts: 1034
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
WickedErasor is not online. WickedErasor
Joined: 24 Dec 2009
Total Posts: 1375
09 Aug 2011 09:20 AM
That didn't help and the problem is not with the ends.
Report Abuse
bikerking300 is not online. bikerking300
Joined: 31 Mar 2010
Total Posts: 1034
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image