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: Why won't this simple script work?

Previous Thread :: Next Thread 
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
11 Aug 2012 10:34 AM
print("hi")
script.Parent.MouseButton1Down:connect(function() print("bye") end)

It prints hi
When I click on the ImageButton, it doesn't do anything.
Yes, the ImageButton is active
Report Abuse
HilariousDwarf is not online. HilariousDwarf
Joined: 20 Aug 2010
Total Posts: 2020
11 Aug 2012 10:36 AM
Just wondering, is this in a LocalScript?
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
11 Aug 2012 10:36 AM
It is, but I thought normal scripts within the PlayerGui ran on the client side anyways?
But whatever, yes it is in a LocalScript.
Report Abuse
liavt is not online. liavt
Joined: 12 Mar 2009
Total Posts: 1241
11 Aug 2012 10:36 AM
function clicked
print("hi")
end


script.Parent.MouseButton1Down:connect(clicked)
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
11 Aug 2012 10:38 AM
Nope.
Report Abuse
HilariousDwarf is not online. HilariousDwarf
Joined: 20 Aug 2010
Total Posts: 2020
11 Aug 2012 10:39 AM
LocalScripts seem to be very buggy right now. I tried using localscripts and they just don't work at all for me. Could be an update.
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
11 Aug 2012 10:43 AM
Oddly enough my other localscript that controls when the mouse hovers over the buttons works perfectly fine.
Report Abuse
HilariousDwarf is not online. HilariousDwarf
Joined: 20 Aug 2010
Total Posts: 2020
11 Aug 2012 10:44 AM
Well, I used the mouse in my scripts. Maybe the LocalScripts fail when it has something to do with the mouse (because I changed my gun to use the Humanoid's TargetPoint instead and it worked fine)
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