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
|
  |
| Joined: 10 Nov 2009 |
| Total Posts: 1054 |
|
|
| 14 Aug 2012 09:55 PM |
| perhaps it's because your using w? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| Joined: 15 Mar 2011 |
| Total Posts: 59 |
|
| |
|
|
| 14 Aug 2012 10:31 PM |
You can use "w" but it makes it weird.
~2.9k posts/20k posts |
|
|
| Report Abuse |
|
|