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: Broken.

Previous Thread :: Next Thread 
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
14 Apr 2012 11:22 AM
local g = game.Workspace.Ready

g.Changed:connect(function()
script.Parent.Text = "The Game Is Starting..."
wait(5)
---------------
coroutine.wrap(function()
for index, value in pairs(Game.Players:GetPlayers()) do
pcall(function() value.Character:MoveTo(Vector3.new(-68.5, 0.6, -161.5)) end)
end
end)()
---------------
wait(1)
script.Parent.Text = "Get To Your Base!"
wait(3)
for i = 30,1,-1 do
script.Parent.Text = i
g = game.Workspace.InvisWalls:GetChildren()
for i = 1,#g do
g.CanCollide = true
wait()
for i = 150,1,-1 do
script.Parent.Text = "Building Time Left: "..i
wait()
end


end
end


end)
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
14 Apr 2012 11:23 AM
Well, could you provide a description at least?
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
14 Apr 2012 11:29 AM
Sorry, I need to change something on it. MNN made the teleport part for me, is there any way that I can choose 6 positions, and make each player tele to a random one?
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
14 Apr 2012 11:49 AM
local g = game.Workspace.Ready

g.Changed:connect(function()
script.Parent.Text = "The Game Is Starting..."
wait(5)
---------------
coroutine.wrap(function()
for index, value in pairs(Game.Players:GetPlayers()) do
pcall(function() value.Character.Torso.CFrame = CFrame.new(-68.5, 0.6, -161.5)
end)
end
end)
wrap()
---------------
wait(1)
script.Parent.Text = "Get To Your Base!"
wait(3)
for i = 30,1,-1 do
script.Parent.Text = i
end
g = game.Workspace.InvisWalls:GetChildren()
for i = 1,#g do
if g[i].ClassName == "Part" then
g.CanCollide = true
wait()
end
end
for i = 150,1,-1 do
script.Parent.Text = "Building Time Left: "..i
wait()
end

end)

I really wasn't sure what you wanted. . . So not sure if that'll work. But, whatever. We'll see. Might error, because I couldn't check the ends

Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
14 Apr 2012 11:53 AM
@ miz, I wanted to be able to make it so that each player went to a different location that I choose.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
14 Apr 2012 11:56 AM
Then why do I see script.Parent.Text and such?

Did my script work? Did you test it?
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
14 Apr 2012 11:58 AM
Your script did not work, the reason you see the script.Parent.Text's are there because it's in a gui, also what I'm trying to do is that it teleports the players, and I need it to teleport them to 6 specific locations. Thanks
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
14 Apr 2012 12:02 PM
Did my script error in anyway? Because I didn't check the ends . . .

And from what I see, youhave once position.
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
14 Apr 2012 12:04 PM
I know @ miz, I am wondering how to make it so that I can put in 6 positiong and that each player will go to their own position. This script works here:

local g = game.Workspace.Ready

g.Changed:connect(function()
script.Parent.Text = "The Game Is Starting..."
wait(5)
---------------
coroutine.wrap(function()
for index, value in pairs(Game.Players:GetPlayers()) do
pcall(function() value.Character:MoveTo(Vector3.new(-68.5, 0.6, -161.5)) end)
end
end)()
---------------
wait(1)
script.Parent.Text = "Get Ready"
wait(5)
g = game.Workspace.InvisWalls:GetChildren()
for i = 1,#g do
g.CanCollide = true
wait(15)
for i = 150,1,-1 do
script.Parent.Text = "Building Time Left: "..i
wait(1)
end
end
end)
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
14 Apr 2012 12:06 PM
Wait, so the script works, you just want all the players to move into a different position?
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
14 Apr 2012 12:07 PM
Yes, I messed up on the title.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
14 Apr 2012 12:09 PM
Put all the players into a table,

Then index the table to the position.

Example

tab = {}
for i,v in pairs(game.Players:GetPlayers()) do
table.insert(tab,v.Name)
end
game.Players[tab[1]].Character.Torso.CFrame = CFrame.new()
game.Players[tab[2]].Character.Torso.CFrame = CFrame.new()

And so on. . .

Kinda inefficient, but that's one way to do it.
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
14 Apr 2012 12:10 PM
If you want the locations to be randomly selected, then here.

positions = {position1, position2, position3) --Insert Vector3 values into this table

local g = game.Workspace.Ready

g.Changed:connect(function()
script.Parent.Text = "The Game Is Starting..."
wait(5)
---------------
coroutine.wrap(function()
for index, value in pairs(Game.Players:GetPlayers()) do
pcall(function() value.Character:MoveTo(position[math.random(1,#positions)]) end)
end
end)()
---------------
wait(1)
script.Parent.Text = "Get Ready"
wait(5)
g = game.Workspace.InvisWalls:GetChildren()
for i = 1,#g do
g.CanCollide = true
wait(15)
for i = 150,1,-1 do
script.Parent.Text = "Building Time Left: "..i
wait(1)
end
end
end)
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
14 Apr 2012 12:11 PM
^

His idea is better, but both ways would work.
Report Abuse
Quovis is not online. Quovis
Joined: 24 Mar 2012
Total Posts: 494
14 Apr 2012 12:33 PM
@ dark, I tried, it didn't work
positions = {70, 1, -34, 70, 1, -162, 70, 1, -290, -205, 1, -290, -205, 1, -162, -205, 1, -34)

local g = game.Workspace.Ready

g.Changed:connect(function()
script.Parent.Text = "The Game Is Starting..."
wait(5)
---------------
coroutine.wrap(function()
for index, value in pairs(Game.Players:GetPlayers()) do
pcall(function() value.Character:MoveTo(position[math.random(1,#positions)]) end)
end
end)()
---------------
wait(1)
script.Parent.Text = "Get Ready"
wait(5)
g = game.Workspace.InvisWalls:GetChildren()
for i = 1,#g do
g.CanCollide = true
wait(15)
for i = 150,1,-1 do
script.Parent.Text = "Building Time Left: "..i
wait(1)
end
end
end)

-- iPremiumZ
Report Abuse
Quovis is not online. Quovis
Joined: 24 Mar 2012
Total Posts: 494
14 Apr 2012 12:43 PM
qq
Report Abuse
Quovis is not online. Quovis
Joined: 24 Mar 2012
Total Posts: 494
14 Apr 2012 12:46 PM
Bawmp
Report Abuse
Quovis is not online. Quovis
Joined: 24 Mar 2012
Total Posts: 494
14 Apr 2012 12:54 PM
BUMP
Report Abuse
Quovis is not online. Quovis
Joined: 24 Mar 2012
Total Posts: 494
14 Apr 2012 01:00 PM
bellybump
Report Abuse
Quovis is not online. Quovis
Joined: 24 Mar 2012
Total Posts: 494
14 Apr 2012 01:05 PM
u nobs r ignorign me
Report Abuse
Quovis is not online. Quovis
Joined: 24 Mar 2012
Total Posts: 494
14 Apr 2012 01:17 PM
AHHHHHHH
Report Abuse
Quovis is not online. Quovis
Joined: 24 Mar 2012
Total Posts: 494
14 Apr 2012 01:33 PM
OHOHOHOHOHHAWHAWHHWHHHAHAHAHAAAAHHAHAAHHAAA
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
14 Apr 2012 01:40 PM
positions = {Vector3.new(70, 1, -34),Vector3.new( 70, 1, -162),Vector3.new( 70, 1, -290),Vector3.new( -205, 1, -290, -205), Vector3.new(1, -162, -205),Vector3.new(SOME OTHER POSITION!}
Report Abuse
Quovis is not online. Quovis
Joined: 24 Mar 2012
Total Posts: 494
14 Apr 2012 01:51 PM
Still doesn't work, like it doesn't do anything anymore. qq


positions = {Vector3.new(70, 1, -34),Vector3.new( 70, 1, -162),Vector3.new( 70, 1, -290),Vector3.new( -205, 1, -290, -205), Vector3.new(1, -162, -205),Vector3.new(-205, 1, -34}

local g = game.Workspace.Ready

g.Changed:connect(function()
script.Parent.Text = "The Game Is Starting..."
wait(5)
---------------
coroutine.wrap(function()
for index, value in pairs(Game.Players:GetPlayers()) do
pcall(function() value.Character:MoveTo(position[math.random(1,#positions)]) end)
end
end)()
---------------
wait(1)
script.Parent.Text = "Get Ready"
wait(5)
g = game.Workspace.InvisWalls:GetChildren()
for i = 1,#g do
g.CanCollide = true
wait(15)
for i = 150,1,-1 do
script.Parent.Text = "Building Time Left: "..i
wait(1)
end
end
end)
Report Abuse
Quovis is not online. Quovis
Joined: 24 Mar 2012
Total Posts: 494
14 Apr 2012 01:58 PM
SH feels dead.
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