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 » Scripters
Home Search
 

Re: Regen script only works once in studio, not at all in game?

Previous Thread :: Next Thread 
Celeritas is not online. Celeritas
Joined: 15 Dec 2012
Total Posts: 50
20 Jun 2015 08:36 PM
Hey friends, I'm working on making a game. I have a regen GUI where when you click a button, it regenerates everything. This works once in studio, then no longer works; It doesnt work at all in game.
Help?
Thank you!

script.Parent.MouseButton1Click:connect(function(regen)
local allDebris = game.ServerStorage.all
print("Regenerating all parts.")
local leaderstats = script.Parent.Parent.Parent.Parent.Parent.leaderstats
local coins = leaderstats.Coins
if coins.Value >= 500 then
local allParts = game.Workspace:FindFirstChild("all")
if allParts then
allParts:Remove()
allDebris:Clone().Parent = game.Workspace
coins.Value = coins.Value - 500
end
else print "Nothing doing."
end
end)
Report Abuse
KillerKyle is online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
20 Jun 2015 08:53 PM
Do you have an output?
Report Abuse
Celeritas is not online. Celeritas
Joined: 15 Dec 2012
Total Posts: 50
21 Jun 2015 07:06 AM
Bump
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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