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: Hopperbin script does not work

Previous Thread :: Next Thread 
TheHungry is not online. TheHungry
Joined: 15 Mar 2011
Total Posts: 59
14 Aug 2012 09:40 PM
script.Parent.Selected:connect(function(mouse)
mouse.KeyDown:connect(function(key)
if key == "w" then
game.Workspace.TESTPART.BodyThrust.force = Vector3.new(0, 100, 0)
end
end)
mouse.KeyUp:connect(function(key)
if key == "w" and game.Workspace.BodyThrust.force == Vector3.new(0, 100, 0) then
game.Workspace.TESTPART.BodyThrust.force = Vector3.new(0, 0, 0)
end)
end)


--OUTPUT
Players.Player.Backpack.HopperBin.Script:10: unexpected symbol near ')'
Report Abuse
URX is not online. URX
Joined: 10 Nov 2009
Total Posts: 1054
14 Aug 2012 09:55 PM
perhaps it's because your using w?
Report Abuse
UFAIL2 is online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
14 Aug 2012 10:02 PM
@urx

What does they key have to do with it?

script.Parent.Selected:connect(function(mouse)
mouse.KeyDown:connect(function(key)
if key == "w" then
game.Workspace.TESTPART.BodyThrust.force = Vector3.new(0, 100, 0)
end
end)
mouse.KeyUp:connect(function(key)
if key == "w" and game.Workspace.BodyThrust.force == Vector3.new(0, 100, 0) then
game.Workspace.TESTPART.BodyThrust.force = Vector3.new(0, 0, 0)
end -- Closes the if statement
end)
end)
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
14 Aug 2012 10:03 PM
I don't know if you can use "w", though it should be:

script.Parent.Selected:connect(function(mouse)
mouse.KeyDown:connect(function(key)
if key == "w" then
game.Workspace.TESTPART.BodyThrust.force = Vector3.new(0, 100, 0)
end
end)
mouse.KeyUp:connect(function(key)
if key == "w" and game.Workspace.BodyThrust.force == Vector3.new(0, 100, 0) then
game.Workspace.TESTPART.BodyThrust.force = Vector3.new(0, 0, 0)
end
end)
end)

† KMXD †
Report Abuse
TheHungry is not online. TheHungry
Joined: 15 Mar 2011
Total Posts: 59
14 Aug 2012 10:21 PM
Thanks
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
14 Aug 2012 10:31 PM
You can use "w" but it makes it weird.

~2.9k posts/20k posts
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