|
| 30 Apr 2014 04:33 PM |
So I'm making my tycoon kit a bit more advanced for a game I plan on making. However, one of the main scripts that would accomplish this isn't working, and I don't know why. I don't have any Output available as whenever I try to join the game, it froze. It was fine when I played it. I also remember that it didn't even mention the script itself.
I'm pretty sure this is the problem. Can someone please fix this? Here it is:
model = script.Parent.Parent.Parent.Second local upgradeStuff = model:clone()
wait(1)
model:remove()
repeat wait() until script.Parent.Parent:findFirstChild("Income1")
while true do
if script.Parent.Value == true then wait(0.1) upgradeStuff.Parent = script.Parent.Parent.Parent end end
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 30 Apr 2014 06:51 PM |
while true do
if script.Parent.Value == true then wait(0.1) upgradeStuff.Parent = script.Parent.Parent.Parent end end
if the if statement is false this happends:
while true do end |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 30 Apr 2014 06:52 PM |
| Don't know why it wouldn't be working, I'd have to see the rest of the script but I can tell you that you should use the Destroy method, not the Remove. Le Lag. |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 30 Apr 2014 06:53 PM |
| ^^Ohhh I didn't see that! Smart! |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 30 Apr 2014 06:56 PM |
Thanks.
I don't get why people use while true do. |
|
|
| Report Abuse |
|
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 30 Apr 2014 07:02 PM |
How did you fix it.
Did repeat wait never came true?
|
|
|
| Report Abuse |
|
|
|
| 30 Apr 2014 07:14 PM |
I can't check output because solo mode keeps freezing on me Online mode is the only way to check it |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2014 07:16 PM |
I also know for a fact that the problem is with the script I posted on the thread. If it was a problem with the buttons I would know, as they would not disappear if they were the problem |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 30 Apr 2014 07:36 PM |
while true do end is the problem.
it makes you freeze. |
|
|
| Report Abuse |
|
|
|
| 01 May 2014 05:12 PM |
| I still need help with this |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 01 May 2014 05:26 PM |
while wait (.1) do -- moved it out of the if statement if script.Parent.Value then -- shortcut for booleans upgradeStuff.Parent = script.Parent.Parent.Parent; end end |
|
|
| Report Abuse |
|
|
|
| 01 May 2014 06:30 PM |
@max
Thank you so much! It works! |
|
|
| Report Abuse |
|
|