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: Help!

Previous Thread :: Next Thread 
Syjoseph1892 is not online. Syjoseph1892
Joined: 16 May 2009
Total Posts: 56
24 Feb 2012 11:07 PM
top = script.Parent.Parent.Bottom
bottom = script.Parent.Parent.Top

function(onClicked)
top.Anchored = false
bottom.Anchored = false
wait(9)
top.Anchored = true
bottom.Anchored = true
top.BodyVelocity = Vector3.new(50,0,0)
bottom.BodyVelocity = Vector3.new(-50,0,0)
script.Parent.BrickColor = "Bright green"
script.Parent.Script2.Disabled = false
script.Disabled = true
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

That is the script and it says: name expected near "(" in line 4. Whats wrong?
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
24 Feb 2012 11:09 PM
You don't have a function, you just have an parameter.


top = script.Parent.Parent.Bottom
bottom = script.Parent.Parent.Top

function onClicked()
top.Anchored = false
bottom.Anchored = false
wait(9)
top.Anchored = true
bottom.Anchored = true
top.BodyVelocity = Vector3.new(50,0,0)
bottom.BodyVelocity = Vector3.new(-50,0,0)
script.Parent.BrickColor = BrickColor.new("Bright green")
script.Parent.Script2.Disabled = false
script.Disabled = true
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

Report Abuse
Syjoseph1892 is not online. Syjoseph1892
Joined: 16 May 2009
Total Posts: 56
24 Feb 2012 11:10 PM
OMG DUH!!!! Thanks!!!!
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
24 Feb 2012 11:11 PM
OMG DERP!!!!!! You're welcome :D
Report Abuse
Syjoseph1892 is not online. Syjoseph1892
Joined: 16 May 2009
Total Posts: 56
24 Feb 2012 11:16 PM
Ok now it says BodyVelocity is not a member of the the brick (line 10) I inserted a BodyVelocity....nvm
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
24 Feb 2012 11:22 PM
...

I'm not sure if you need more help or you're done because of that nvm :l
Report Abuse
Syjoseph1892 is not online. Syjoseph1892
Joined: 16 May 2009
Total Posts: 56
24 Feb 2012 11:32 PM
I just got it working, thanks for help
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