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: Lobby Script

Previous Thread :: Next Thread 
DandamanGAMEZ is not online. DandamanGAMEZ
Joined: 13 Mar 2013
Total Posts: 156
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
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
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
DandamanGAMEZ is not online. DandamanGAMEZ
Joined: 13 Mar 2013
Total Posts: 156
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
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
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 is not online. 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
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