|
| 16 Apr 2013 12:28 PM |
| So i'm very new to scripting, but i am trying to learn. What i am trying to make is a "Lobby" script, the place players go, when a new map/balancing teams again for my Sword Fighting Game. Now ive been teaching myself using lualearners.org and other stuff, and i know what to use to do it, i just cant compile it right :/. For instance, i know that i would have to you CFrame function to teleport the players to the Lobby/observation box, but i wouldn't have a clue...well, how to do it >_<. If anyone knows what i need to do, or where i can learn specific questions like these, that would help a bunches, thanks! =) |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2013 12:50 PM |
To teleport all the players:
a = game.Players:GetChildren() for i = 1, #a do a.Character.Torso.CFrame = Workspace.teleportbrick.CFrame wait() end
make a brick in workspace called teleportbrick, this is where all the players will teleport
|MassiveGman| Scripter & part time Professional Whistler |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2013 12:51 PM |
| Thanks so much! Now all i would need is a timer, to end the game, THEN teleport all players to the Lobby.... I should be able to manage that, thanks so much =) |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2013 01:15 PM |
oops I lied
a = game.Players:GetChildren() for i = 1, #a do a[i].Character.Torso.CFrame = Workspace.teleportbrick.CFrame wait() end
|MassiveGman| Scripter & part time Professional Whistler |
|
|
| Report Abuse |
|
|
saurus10
|
  |
| Joined: 30 Aug 2010 |
| Total Posts: 87 |
|
|
| 22 Feb 2014 01:22 PM |
May THIS be of any assistance?
Lobby and ending timer included!
while true do local start = 10
local hint = Instance.new("Hint") hint.Parent = game.Workspace for i = 1,start do hint.Text = start - i wait(1) end hint.Text = "Starting Game." -- Change this to what you want it to say when its starting the game wait(2) hint:remove()
target = CFrame.new(-331.6, 2.5, -26.6) -- Location you want them to go for i, player in pairs(game.Players:GetChildren()) do player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0) end
local start = 10 local hint = Instance.new("Hint") hint.Parent = game.Workspace for i = 1,start do hint.Text = start - i wait(1) end hint.Text = "You Lost!" -- Lose message p = game.Players:GetChildren() for i = 1,#p do p[i].Character.Head:remove() end wait(2) hint:remove()
end |
|
|
| Report Abuse |
|
|