link7002
|
  |
| Joined: 26 May 2009 |
| Total Posts: 545 |
|
|
| 26 Dec 2011 02:20 PM |
g = 1 speed = 0.01
script.Parent.Selected:connect(function(Mouse) Mouse.KeyDown:connect(function(Key)
if Key == "a" then g = g - speed script.Parent.Parent.Parent.PlayerGui.ScreenGui.Menu2.Mario.Position = UDim2.new(g,0,0,0)
if g < -0.1 then g = 1 end
wait()
end end) end)
I need it to work while I hold down the A button. Thanks in advanced ( yes I know it's a fail question ) |
|
|
| Report Abuse |
|
|
link7002
|
  |
| Joined: 26 May 2009 |
| Total Posts: 545 |
|
|
| 26 Dec 2011 02:50 PM |
| Okay guys, how about I describe it like this: When I'm pressing A, 'Mario' moves left. When I let go, 'Mario' stops moving |
|
|
| Report Abuse |
|
|
link7002
|
  |
| Joined: 26 May 2009 |
| Total Posts: 545 |
|
| |
|
dennisvdz
|
  |
| Joined: 14 Dec 2008 |
| Total Posts: 3710 |
|
|
| 26 Dec 2011 03:15 PM |
local holda = false .... if Key == "a" then holda = true repeat .. wait() until holda == false ....
Mouse.KeyDown:connect(function(k) if k == "a" then holda = false end end) |
|
|
| Report Abuse |
|
|
dennisvdz
|
  |
| Joined: 14 Dec 2008 |
| Total Posts: 3710 |
|
|
| 26 Dec 2011 03:16 PM |
Correction..
local holda = false .... if Key == "a" then holda = true repeat .. wait() until holda == false ....
Mouse.KeyUp:connect(function(k) if k == "a" then holda = false end end)
* |
|
|
| Report Abuse |
|
|
link7002
|
  |
| Joined: 26 May 2009 |
| Total Posts: 545 |
|
| |
|
dennisvdz
|
  |
| Joined: 14 Dec 2008 |
| Total Posts: 3710 |
|
|
| 26 Dec 2011 03:21 PM |
| Feels like you don't do anything till we post a copy-paste script for you. |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2011 04:22 PM |
| That's how most people are :P |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2011 04:45 PM |
"That's how most people are :P"
Meh... he's just a lazy n0b |
|
|
| Report Abuse |
|
|
link7002
|
  |
| Joined: 26 May 2009 |
| Total Posts: 545 |
|
|
| 29 Dec 2011 11:12 AM |
| Cockey scripters. I know I'm on the scripting 'helpers' when |
|
|
| Report Abuse |
|
|
dennisvdz
|
  |
| Joined: 14 Dec 2008 |
| Total Posts: 3710 |
|
|
| 29 Dec 2011 11:24 AM |
Did you even try my code? Were there errors? What went wrong? Something else then "Nop" is much more useful to us. >_> |
|
|
| Report Abuse |
|
|