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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Game script timeout?

Previous Thread :: Next Thread 
Jonibus is not online. Jonibus
Joined: 30 Jan 2010
Total Posts: 8985
10 May 2014 08:02 PM
coroutine.wrap(function()
while true do
if not hunting and target == "Nobody" then
script.Parent.Parent.Humanoid:MoveTo(Vector3.new(math.random(-132,116),3.1,math.random(-125,126)),game.Workspace.Floor)
wait(math.random(20,60))
end
end
end)()

It also says there is some problem with resuming the thread. What does this mean and how can I fix it?

Follow me on twitter: @Jonibus_RBX
Report Abuse
Jonibus is not online. Jonibus
Joined: 30 Jan 2010
Total Posts: 8985
10 May 2014 08:06 PM
The second error is "Timeout while resuming thread"
The game freezes up while it happens.

Follow me on twitter: @Jonibus_RBX
Report Abuse
Jonibus is not online. Jonibus
Joined: 30 Jan 2010
Total Posts: 8985
10 May 2014 08:26 PM
Bump.

Follow me on twitter: @Jonibus_RBX
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
10 May 2014 08:27 PM
Lets say the of stat,ent is false, it endlessly loops.
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
10 May 2014 08:27 PM
You have a non yielding infinite loop.


One which keeps going without a wait() in it.


That while true do one ya have there.

Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
10 May 2014 08:27 PM
simplify it, its while true do end
Report Abuse
Jonibus is not online. Jonibus
Joined: 30 Jan 2010
Total Posts: 8985
10 May 2014 08:28 PM
Which statement? I want it to loop endlessly (with the random wait of 20-60 seconds) as long as the two conditions are met.

Follow me on twitter: @Jonibus_RBX
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
10 May 2014 08:29 PM
while true do wait(math.random(20,60))

instead of

while true do
Report Abuse
Jonibus is not online. Jonibus
Joined: 30 Jan 2010
Total Posts: 8985
10 May 2014 08:35 PM
Alright, I'll try that, thanks.

Follow me on twitter: @Jonibus_RBX
Report Abuse
Gamecube44 is not online. Gamecube44
Joined: 24 Jul 2013
Total Posts: 130
17 May 2014 11:06 PM
First of all, humanoid isn't the character model. It just holds the player's data. You just say: script.Parent.Parent
Report Abuse
Jonibus is not online. Jonibus
Joined: 30 Jan 2010
Total Posts: 8985
18 May 2014 10:52 AM
I long since fixed this script, and you're incorrect. There are two different forms of MoveTo. One is to teleport models, one is to make humanoids walk.

Follow me on twitter: @Jonibus_RBX
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
18 May 2014 10:57 AM
Making a player's character walk to a point will need to have the player to not have Mouse Lock on.
Report Abuse
Jonibus is not online. Jonibus
Joined: 30 Jan 2010
Total Posts: 8985
18 May 2014 08:37 PM
It's not a character it's an AI.

Follow me on twitter: @Jonibus_RBX
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