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
 

I just scripted my first game :D

Previous Thread :: Next Thread 
Provix101 is not online. Provix101
Joined: 13 Jul 2014
Total Posts: 313
31 Jul 2014 09:27 PM
Too bad it doesn't work...

Can someone tell me if what I did has no way of working no matter what or if there is just a few thing that need to be fixed.

map1 = game.Lighting.findFirstChild("Map1")

clone1 = map1:clone()

time = 30

--Game Starting
if game.Players.NumPlayers == 2 then
wait(5)
game.Lighting.Message.Text = "Loading Game..."
local map = clone1:clone()
map.Parent = game.Workspace
wait(3)
game.Lighting.Message.Text = ""
wait(.01)
game.Lighting.Message.Text = "Starting Game..."
wait(3)
script.Parent(teleport)
wait(time)
map:remove()
end

-- Not Enough Players
if game.Players.NumPlayers == 1 then
game.Lighting.Message.Text = "Sorry not enough players! Please wait for another player to join."
end

--Spawning

local function teleport()
local sword = game.Lighting.findFirstChild("LinkedSword")
local sword1 = sword:clone()
local Players = game.Players
local player = Players:GetChildren()
local pickedPl = player[math.random(1, #player)]
local pickedP2 = player[math.random(1, #player)]
wait(1)
game.Lighting.Message.Text = "Spawning 2 Random players"
pickedP1.Position = Vector3.new(141.6, 0.59, 74.7)
pickedP2.Position = Vector3.new(153.8, 0.59, 74.7)
game.Lighting.Message.Text = ""
wait(.01)
game.Lighting.Message.Text = "You have 30 seconds to get to finish without dying, good luck!"
wait(5)
local sword2 = sword1:clone()
sword2.Parent = game.Players.pickedP1.StarterPack
sword2.Parent = game.Players.pickedP2.StarterPack
end
Report Abuse
jerryg225 is not online. jerryg225
Joined: 20 Aug 2008
Total Posts: 23187
31 Jul 2014 09:29 PM
No way of working what so ever unless you add loops to check for more players and add loops to start a new game after the first one ended, etc
Report Abuse
Provix101 is not online. Provix101
Joined: 13 Jul 2014
Total Posts: 313
31 Jul 2014 09:32 PM
added loops still dont work :c
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