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 » Game Design
Home Search
 

Need help with my script

Previous Thread :: Next Thread 
Jamalosaurus is not online. Jamalosaurus
Joined: 06 Jun 2012
Total Posts: 598
16 Feb 2016 07:11 PM
This is just a small script I made (wanting to eventually make a game script) but I was wondering how to make it loop?
I haven't been scripting very long, just about a week or two, so I don't really understand how to make a script do something repeatedly yet.
Everything else in the script works right now though.
Here is the script:


h = Instance.new('Hint')
h.Parent = game.Workspace
c = 25
g = 25
h.Text = "The next round will start in " ..c.. " seconds!"

while true do
wait(1)
c = c - 1
h.Text = "The next round will start in " ..c.. " seconds!"
if c == 0 then
wait(.01)
h:Remove()
a = Instance.new('Hint')
a.Parent = game.Workspace
a.Text = "The round will end in " ..g.. " seconds!"
target = Vector3.new(49, 100.5, 77)
for i, v in pairs(game.Players:GetChildren()) do
v.Character.Torso.CFrame = CFrame.new(target + Vector3.new(0, i * 10, 0))
while true do
wait(1)
g = g - 1
a.Text = "The round will end in " ..g.. " seconds!"
if g == 0 then
wait(.1)
a:Remove()
target = Vector3.new(6.6, 6.5, 22.8)
for i, v in pairs(game.Players:GetChildren()) do
v.Character.Torso.CFrame = CFrame.new(target + Vector3.new(0, i * 10, 0))
end
end
end
end
end
end


Report Abuse
extremeninjamaster is not online. extremeninjamaster
Joined: 25 Feb 2012
Total Posts: 2570
16 Feb 2016 07:16 PM
You might wanna go to scripter's forum for that there buddy :P


"All Hail floaty red brick"
Report Abuse
Jamalosaurus is not online. Jamalosaurus
Joined: 06 Jun 2012
Total Posts: 598
16 Feb 2016 07:40 PM
I didn't go there cause it says no help requests :/


Report Abuse
purplescheer9 is not online. purplescheer9
Joined: 16 Jan 2011
Total Posts: 3852
16 Feb 2016 07:56 PM
i think all you need to do is move the line that says "while true do" to the top of the script so that the loop includes repeating the round will start hint.
Report Abuse
purplescheer9 is not online. purplescheer9
Joined: 16 Jan 2011
Total Posts: 3852
16 Feb 2016 07:57 PM
also, this makes me miss the scripting helpers forum :(
Report Abuse
Jamalosaurus is not online. Jamalosaurus
Joined: 06 Jun 2012
Total Posts: 598
16 Feb 2016 08:03 PM
Thanks, I'll try that :)


Report Abuse
Jamalosaurus is not online. Jamalosaurus
Joined: 06 Jun 2012
Total Posts: 598
16 Feb 2016 08:10 PM
that didn't work hmmm..


Report Abuse
ProjectSlayer is not online. ProjectSlayer
Joined: 04 Oct 2012
Total Posts: 10148
16 Feb 2016 08:25 PM
The Scripters forum desc. says it doesn't take help requests, but in reality, it does. There's no other good place to put requests. If you feel unsure about it, use an alt.
Report Abuse
Jamalosaurus is not online. Jamalosaurus
Joined: 06 Jun 2012
Total Posts: 598
17 Feb 2016 11:24 AM
Okay, thanks :)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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