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
 

GUI Game

Previous Thread :: Next Thread 
link7002 is not online. 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 is not online. 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 is not online. link7002
Joined: 26 May 2009
Total Posts: 545
26 Dec 2011 03:11 PM
Bump...
Report Abuse
dennisvdz is not online. 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 is not online. 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 is not online. link7002
Joined: 26 May 2009
Total Posts: 545
26 Dec 2011 03:20 PM
Nup
Report Abuse
dennisvdz is not online. 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
Stickerface101 is not online. Stickerface101
Joined: 14 Feb 2009
Total Posts: 341
26 Dec 2011 04:22 PM
That's how most people are :P
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
26 Dec 2011 04:45 PM
"That's how most people are :P"

Meh... he's just a lazy n0b
Report Abuse
link7002 is not online. 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 is not online. 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
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