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: Tycoon Regen Script. Help Needed!

Previous Thread :: Next Thread 
hamburger621 is not online. hamburger621
Joined: 20 Apr 2013
Total Posts: 845
21 Aug 2016 10:11 AM
ok, i am building a tycoon and have this regen script:

local newMain = script.Parent.Main:Clone()

script.Parent.Main.Owner.Changed:connect(function()
while true do
wait()
local owner = game.Players:FindFirstChild(script.Parent.Main.Owner.Value)
if owner == nil then
script.Parent.Main:Remove()
MainClone = newMain:Clone()
MainClone.Parent = script.Parent
MainClone:MakeJoints()
script.Disabled = true
wait(0.1)
script.Disabled = false
break
end
end
end)

But when the user leaves, the tycoon regens, but the new owner of the tycoon that joins is unable to buy any upgrades, and the buttons become unresponsive. The players then have to start a new server to be able to play the tycoon.

Can anybody help me?
Report Abuse
CeaselessQuokka is not online. CeaselessQuokka
Joined: 03 Jul 2012
Total Posts: 7841
21 Aug 2016 10:18 AM
script.Disabled = true
wait(0.1)
script.Disabled = false

If the script is disabled it won't execute any more code.


Matthew: "Scripting for ROBLOX intelligence? There is no intelligence in ROBLOX." Me: "LOL"
Report Abuse
hamburger621 is not online. hamburger621
Joined: 20 Apr 2013
Total Posts: 845
21 Aug 2016 10:32 AM
So i should delete those three lines of code?
Report Abuse
hamburger621 is not online. hamburger621
Joined: 20 Apr 2013
Total Posts: 845
21 Aug 2016 10:54 AM
So, i removed that section, but then the tycoon just doesnt regen???
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