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: I need help with a game script

Previous Thread :: Next Thread 
CoolJohnnyboy is not online. CoolJohnnyboy
Joined: 09 Mar 2010
Total Posts: 17699
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
CoolJohnnyboy is not online. CoolJohnnyboy
Joined: 09 Mar 2010
Total Posts: 17699
30 Apr 2014 05:01 PM
bump1
Report Abuse
CoolJohnnyboy is not online. CoolJohnnyboy
Joined: 09 Mar 2010
Total Posts: 17699
30 Apr 2014 06:48 PM
please help
Report Abuse
vlekje513 is not online. 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 is not online. 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 is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
30 Apr 2014 06:53 PM
^^Ohhh I didn't see that! Smart!
Report Abuse
vlekje513 is not online. 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
CoolJohnnyboy is not online. CoolJohnnyboy
Joined: 09 Mar 2010
Total Posts: 17699
30 Apr 2014 06:59 PM
It still is not working.
Report Abuse
vlekje513 is not online. 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
CoolJohnnyboy is not online. CoolJohnnyboy
Joined: 09 Mar 2010
Total Posts: 17699
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
CoolJohnnyboy is not online. CoolJohnnyboy
Joined: 09 Mar 2010
Total Posts: 17699
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 is not online. 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
CoolJohnnyboy is not online. CoolJohnnyboy
Joined: 09 Mar 2010
Total Posts: 17699
01 May 2014 05:12 PM
I still need help with this
Report Abuse
maxomega3 is not online. 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
CoolJohnnyboy is not online. CoolJohnnyboy
Joined: 09 Mar 2010
Total Posts: 17699
01 May 2014 06:30 PM
@max

Thank you so much!
It works!
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