|
| 22 Jun 2014 05:54 PM |
I'm trying to make it so when someone picks up the 'pick' the game ends, but if no one finds it within the amount of time the game will also end. After the game ends I want it to restart too. I use this, it works but you have to wait til the end of the amount of time and get the pick and it doesn't restart.
local hint = Instance.new("Hint") hint.Parent = game.Workspace for i = 10,0, -1 do hint.Text = ("Game ends in"..i) wait(1) end local ToothPick = game.Workspace.ToothPick repeat wait(1) until ToothPick.Parent ~= game.Workspace hint:Destroy() playing = true print("playing true")
repeat wait(1) until hint.Text == ("0") hint:Destroy() ToothPick:Destroy() playing = true print("playing true")
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
|
| 22 Jun 2014 06:04 PM |
| I'm waiting until he gets to 9000. |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2014 06:05 PM |
| unless you're going to post something useful don't post at all |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2014 06:06 PM |
1. Check the parent in the for loop 2. Enclose everything in a while loop
You also don't set playing to false anywhere |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2014 06:07 PM |
Ok then keep talking to yourself in your lonely thread. I am basically bumping it right now. Alot of people dont have time for our threads i'm just keepin' ya' company. |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2014 06:07 PM |
| I set playing to true earlier in the script, this is just a portion of it, and I will try what you suggested |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Jun 2014 06:09 PM |
| When the game restarts, just parent 'pick' to Workspace and reposition |
|
|
| Report Abuse |
|
|