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: What is wrong with this?

Previous Thread :: Next Thread 
CanIBeYourFriend12 is not online. CanIBeYourFriend12
Joined: 20 Mar 2010
Total Posts: 2371
03 Dec 2011 02:08 PM
local tycoon = script.Parent.Factory:Clone()
local m = Instance.new("Hint")
m.Text = "Welcome to Zoo Tycoon 3! Version 3.7"
m.Parent = game.Workspace

script.Parent.Factory.Owner.Changed:connect(function()
while true do
wait()
local owner = game.Players:findFirstChild(script.Parent.Factory.Owner.Value)
if owner == nil and m ~= nil then
script.Parent.Factory:Remove()
wait(1)
local newTycoon = tycoon:Clone()
newTycoon.Parent = script.Parent
newTycoon:MakeJoints()
script.Disabled = true
wait(.1)
script.Disabled = false
break
end
end
end)


The tycoon regens, but then after a while it breaks and won't regen. Someone please help me!
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
03 Dec 2011 02:10 PM
Does the hint ever get removed?
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
03 Dec 2011 02:11 PM
*Reads three more lines down*

script.Disabled = true
wait(.1)

Wat.

If this script doesn't get reenabled (by ANOTHER script, since it stops running at all at this pont), the script's going to stop right there.
Report Abuse
CanIBeYourFriend12 is not online. CanIBeYourFriend12
Joined: 20 Mar 2010
Total Posts: 2371
03 Dec 2011 02:11 PM
Bump.

And for more info...

One whole tycoon is just called,"Tycoon".
Inside it, is another model called,"Factory"
Still inside "Tycoon" this script is there and it won't regen.
Report Abuse
CanIBeYourFriend12 is not online. CanIBeYourFriend12
Joined: 20 Mar 2010
Total Posts: 2371
03 Dec 2011 02:13 PM
Well, I'm not such a good scripter. So i don't know how to edit it good enough.
Report Abuse
maurissquad is not online. maurissquad
Joined: 17 Nov 2011
Total Posts: 191
03 Dec 2011 02:13 PM
script.Disabled = true
wait(.1)
script.Disabled = false

Once the script is disabled, it stops running until it's enabled again. You can't enable it from the same script, it has to be done with another script.
Report Abuse
CanIBeYourFriend12 is not online. CanIBeYourFriend12
Joined: 20 Mar 2010
Total Posts: 2371
03 Dec 2011 02:14 PM
So do you guys know how to do this? It came with the tycoon kit I had but this is the only part that doesn't work.
Report Abuse
maurissquad is not online. maurissquad
Joined: 17 Nov 2011
Total Posts: 191
03 Dec 2011 02:16 PM
It doesn't need to be disabled, remove the lines that disable and enable it.
Report Abuse
CanIBeYourFriend12 is not online. CanIBeYourFriend12
Joined: 20 Mar 2010
Total Posts: 2371
03 Dec 2011 02:16 PM
Ok, I'll try it and see if it works out.
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