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 » Scripters
Home Search
 

Re: Could anyone Help me Fix a Simple Script!

Previous Thread :: Next Thread 
CrazyCorrs is not online. CrazyCorrs
Joined: 09 Jan 2016
Total Posts: 633
02 May 2016 01:56 PM
Hello! I Have made a Script that counts down to 0 then Teleports you in game, It then stays in game for 10 sec's and Then breaks your Bones and put you back in the Lobby, That was Working fine, So i added a Repeat to this, and you start as normal in the Lobby for 30 sec's then you get put in game, after 10 sec's it kill's you and puts you back in the Lobby, and is ment to start over again but it doesnt it starts From 10 sec's intead off 30? can someone help me?? Thank's

My Script:

for i=1, 10 do

playersNeeded = 1
whenThereIsEnoughPlayers = function()
end

repeat wait(1) until Game.Players.NumPlayers >= playersNeeded
whenThereIsEnoughPlayers()

local teleportPart = workspace.Part -- The part to teleport to.
local msg = Instance.new("Hint",game.Workspace)
msg.Name = "MyTimer"
while (true) do
for i = 30,0,-1 do
msg.Text = tostring(i)
wait(1)
end
msg.Text = "GAME STARTED"
for _,p in pairs(game.Players:GetPlayers()) do
if (p.Character) then
p.Character.Torso.CFrame = teleportPart.CFrame + Vector3.new(-53.124, 0.5, 145.205)
end
end

while (true) do
for i = 10,0,-1 do
msg.Text = tostring(i)
wait(1)
end

wait(1)
msg.Text = "Game Over... Waiting for Players"
for _,p in pairs(game.Players:GetPlayers()) do
if (p.Character) then
p.Character:BreakJoints()
wait(1)
end
end
end
end
end
wait()
Report Abuse
CrazyCorrs is not online. CrazyCorrs
Joined: 09 Jan 2016
Total Posts: 633
02 May 2016 02:29 PM
anyone No why this is happening?
Report Abuse
teapotez is not online. teapotez
Joined: 12 Nov 2007
Total Posts: 44
02 May 2016 02:34 PM
while (true) do
for i = 10,0,-1 do
msg.Text = tostring(i)
wait(1)
end

Why are you looping that?


Report Abuse
Salinas23 is not online. Salinas23
Joined: 28 Dec 2008
Total Posts: 37142
02 May 2016 02:36 PM
@tea

cuz that works as a countdown text
Report Abuse
teapotez is not online. teapotez
Joined: 12 Nov 2007
Total Posts: 44
02 May 2016 02:36 PM
Btw it doesnt restart because the script finished.


Report Abuse
teapotez is not online. teapotez
Joined: 12 Nov 2007
Total Posts: 44
02 May 2016 02:37 PM
He can also use

for i = 10,0,-1 do
msg.Text = tostring(i)
wait(1)
end

Instead of adding the while true do loop.


Report Abuse
CrazyCorrs is not online. CrazyCorrs
Joined: 09 Jan 2016
Total Posts: 633
02 May 2016 02:37 PM
im not, im looping the whole Thing, That just does the Count Down, i am trying to Loop the whole thing
Report Abuse
teapotez is not online. teapotez
Joined: 12 Nov 2007
Total Posts: 44
02 May 2016 02:38 PM
Then loop the whole script.


Report Abuse
CrazyCorrs is not online. CrazyCorrs
Joined: 09 Jan 2016
Total Posts: 633
02 May 2016 02:40 PM
Just Fixxed it i used the Script you gave me, Thanks :)
Report Abuse
teapotez is not online. teapotez
Joined: 12 Nov 2007
Total Posts: 44
02 May 2016 02:42 PM
No problem :)


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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