flame210
|
  |
| Joined: 28 Dec 2007 |
| Total Posts: 186 |
|
|
| 06 Oct 2012 04:32 PM |
I want to teleport ALL players in the game to a specific location. What peice of code do i need to use to do this?
|
|
|
| Report Abuse |
|
|
JayTheDJ
|
  |
| Joined: 07 Aug 2011 |
| Total Posts: 262 |
|
|
| 06 Oct 2012 04:34 PM |
target = CFrame.new(0, 50, 0) --could be near a brick or in a new area for i, player in ipairs(game.Players:GetChildren()) do player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0) --add an offset of 5 for each character end
Change the top coordinates and you're done |
|
|
| Report Abuse |
|
|
|
| 06 Oct 2012 04:34 PM |
for i,v in pairs(game.Players:GetChildren()) do v.Character.Humanoid:MoveTo(INSERTLOCATIONHERE) |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 06 Oct 2012 04:36 PM |
@Robot actually its:
for i,v in pairs(game.Players:GetPlayers()) do v.Character.Humanoid:MoveTo(Vector3.new(0,10,0))----insert location here end |
|
|
| Report Abuse |
|
|
|
| 06 Oct 2012 04:37 PM |
@Fedora
Uh no, yours is incorrect. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 06 Oct 2012 04:40 PM |
| Ops, remove the humanoid, haha got u.Ufailed i won. |
|
|
| Report Abuse |
|
|
flame210
|
  |
| Joined: 28 Dec 2007 |
| Total Posts: 186 |
|
|
| 06 Oct 2012 04:43 PM |
@Fedorakid
Thank you very much, yours was the one that worked AFTER I removed the humanoid part lol. |
|
|
| Report Abuse |
|
|
|
| 06 Oct 2012 04:44 PM |
for i,k in pairs(game.Players:GetChildren()) do k.Character.Torso.CFrame = CFrame.new(X,Y,Z) end
-- Live young. Enjoy life. -- |
|
|
| Report Abuse |
|
|
|
| 06 Oct 2012 04:49 PM |
| y u guise no use getplayers method |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
| |
|
flame210
|
  |
| Joined: 28 Dec 2007 |
| Total Posts: 186 |
|
|
| 06 Oct 2012 05:00 PM |
Ok so here is a new challenge that I am having. Challenge that is for me not understanding.
After i send the message "Survive" I want the players that are alive for that round to gain "points" But if they die they stop earning points. How do i do this?
message.Text = "SURVIVE!" ?????? --Points earned durring this life go here wait(60) |
|
|
| Report Abuse |
|
|
flame210
|
  |
| Joined: 28 Dec 2007 |
| Total Posts: 186 |
|
|
| 06 Oct 2012 05:01 PM |
| after the 60 seconds, all players stop earning points. |
|
|
| Report Abuse |
|
|
jknite
|
  |
| Joined: 30 Nov 2007 |
| Total Posts: 614 |
|
|
| 06 Oct 2012 05:04 PM |
Put an int Value within the characters. It changes if they die. Then have a script that adds points for all players with the intValue t an original amount. When they teleport back in, switch intValue to the original value. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 06 Oct 2012 05:04 PM |
| To me it doesent sound like a challenge, it sounds like ur requesting us to do all the work for u. |
|
|
| Report Abuse |
|
|
flame210
|
  |
| Joined: 28 Dec 2007 |
| Total Posts: 186 |
|
|
| 06 Oct 2012 05:08 PM |
| Honestly i didnt mean challenge to you guys... I appreciate the help. I have been on scripting wiki all day and have actually created a huge script so far but bits and peices of it i dont understand or the wiki wont help you with. thus its a challenge to me. I am not trying to make you guys do all the work and frankly you havent. Its only been a few lines here and there so far you guys have done and i have done lots so far. Im just not good at this so im asking when its difficult for me. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 06 Oct 2012 05:09 PM |
| And if u really have this script, show me. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 06 Oct 2012 05:11 PM |
| So we can have a good start helping u. |
|
|
| Report Abuse |
|
|
flame210
|
  |
| Joined: 28 Dec 2007 |
| Total Posts: 186 |
|
|
| 06 Oct 2012 05:14 PM |
local Game1 = game.Lighting.Game1 while true do wait(5) local message = Instance.new('Hint', Workspace) -- Insert a new message in the Workspace. message.Text = "Next Game Begins in 30 seconds" -- Set the text of the message to "Hello World!". wait(10) message.Text = "Teleporting players to field" wait(2) for i,v in pairs(game.Players:GetPlayers()) do v.Character:MoveTo(Vector3.new(math.random(-116.2,63.57),15,76.48))----insert location here end message.Text = "Players Teleported" wait(2) message.Text = "Inserting building Materials" wait(1) local Game1 = Game1:Clone() Game1.Parent = Workspace
message.Text = "Start building! Games starts in 30 seconds" wait(25) message.Text = "Game beginds in 5" wait(1) message.Text = "Game beginds in 4" wait(1) message.Text = "Game beginds in 3" wait(1) message.Text = "Game beginds in 2" wait(1) message.Text = "Game beginds in 1" wait(1) message.Text = "SURVIVE THE TOXIC WAIST!" wait(60) message.Text = "Game over!" wait(3) workspace.Game1:Remove() message:Remove()
end
This what i have so far... and trust me this is alot to me. I learned most of this today. except the parts that have helped me |
|
|
| Report Abuse |
|
|
|
| 06 Oct 2012 05:16 PM |
target = CFrame.new(0, 50, 0) --could be near a brick or in a new area for i, player in ipairs(game.Players:GetChildren()) do player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0) --add an offset of 5 for each character end |
|
|
| Report Abuse |
|
|
|
| 06 Oct 2012 05:17 PM |
| http://wiki.roblox.com/index.php/Teleportation |
|
|
| Report Abuse |
|
|
flame210
|
  |
| Joined: 28 Dec 2007 |
| Total Posts: 186 |
|
|
| 06 Oct 2012 05:42 PM |
@Fedorakid
So I posted my script like you said. So no comment? |
|
|
| Report Abuse |
|
|
G36CSD
|
  |
| Joined: 07 Aug 2011 |
| Total Posts: 39 |
|
| |
|
flame210
|
  |
| Joined: 28 Dec 2007 |
| Total Posts: 186 |
|
|
| 06 Oct 2012 06:27 PM |
| All im trying to do is that one last little peice, where after the game says "SURVIVE" the players can start earning a pont for every X amount of seconds, but if the player dies then it stops counting for them. IDK how to do this part. Thats all i need then I will be golden. or so to speak. |
|
|
| Report Abuse |
|
|
|
| 07 Oct 2012 03:17 AM |
Fixed it:
for i,v in pairs(game.Players:GetPlayers()) do v.Character:MoveTo(Vector3.new(math.random(-116.2,63.57,15,76.48)----insert location here end ]] In this chunk here the error is loacated...
v.Character:MoveTo(Vector3.new(-116.2,63.57,15,76.48))----In this line WAS the error. (-116.2,63.57),(15,76.48)---- You left brackets in uwanted places.
local Game1 = game.Lighting.Game1 while true do wait(5) local message = Instance.new('Hint', Workspace) -- Insert a new message in the Workspace. message.Text = "Next Game Begins in 30 seconds" -- Set the text of the message to "Hello World!". wait(10) message.Text = "Teleporting players to field" wait(2) for i,v in pairs(game.Players:GetPlayers()) do v.Character:MoveTo(Vector3.new(-116.2,63.57,15,76.48))----insert location here end message.Text = "Players Teleported" wait(2) message.Text = "Inserting building Materials" wait(1) local Game1 = Game1:Clone() Game1.Parent = Workspace
message.Text = "Start building! Games starts in 30 seconds" wait(25) message.Text = "Game beginds in 5" wait(1) message.Text = "Game beginds in 4" wait(1) message.Text = "Game beginds in 3" wait(1) message.Text = "Game beginds in 2" wait(1) message.Text = "Game beginds in 1" wait(1) message.Text = "SURVIVE THE TOXIC WAIST!" wait(60) message.Text = "Game over!" wait(3) workspace.Game1:Remove() message:Remove()
end
This SHOULD work. |
|
|
| Report Abuse |
|
|