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: script only works in studio

Previous Thread :: Next Thread 
smunkey is not online. smunkey
Joined: 17 Dec 2011
Total Posts: 342
14 Aug 2014 02:49 PM
I have been working for some time now on a brick that will disappear then up a value by one, however closest to working I can get it is this.

function clicked()
local g = _G.grain
g = g + 1
_G.grain = g


end


script.Parent.ClickDetector.MouseClick:connect(clicked)

It is in a normal script inside of a brick. Inside the brick is another normal script (that works 100% fine) that makes it disappear for 300 seconds upon being clicked.

Somewhere else is a script containing

_G.grain = 0
_G.lpc = 50


What is wrong with my script and how do I fix it?
Report Abuse
smunkey is not online. smunkey
Joined: 17 Dec 2011
Total Posts: 342
14 Aug 2014 03:55 PM
bump
Report Abuse
smunkey is not online. smunkey
Joined: 17 Dec 2011
Total Posts: 342
14 Aug 2014 11:59 PM
Anyone?
Report Abuse
cade2000 is not online. cade2000
Joined: 09 Aug 2009
Total Posts: 887
15 Aug 2014 12:05 AM
If a script only works in studio it's generally because it's a local script that should be a server script or the other way around.

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
Report Abuse
smunkey is not online. smunkey
Joined: 17 Dec 2011
Total Posts: 342
15 Aug 2014 03:03 PM
it is a server script, but when I tried changing it too local it wouldn't even work in studio.
Report Abuse
smunkey is not online. smunkey
Joined: 17 Dec 2011
Total Posts: 342
15 Aug 2014 08:12 PM
bump :l
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