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 » Scripters
Home Search
 

Script problem

Previous Thread :: Next Thread 
mokmok74 is not online. mokmok74
Joined: 30 Apr 2010
Total Posts: 166
20 Mar 2015 12:51 PM
this script that i made gets stuck on Deciding what game to play


Code:

minigames = game.Lighting.Minigames:GetChildren()

h = Instance.new("Hint", game.workspace)

while true do

if game.Players.NumPlayers > 1 then
h.Text = "Deciding which map to play"
wait(10)
ranGame = math.random(3, #minigames)
gameChosen = minigames[ranGame]
h.Text = "Map chosen: " .. gameChosen.Name
wait(3)
h.Text = "Team DeathMatch!"
wait(2)
h.Text = "Get as much Tag as Possible!"
wait(4)
gameChosenClone = gameChosen:Clone()
gameChosenClone.Parent = game.Workspace
wait(4)
--Teleporting Players to Spawn.
spawns = gameChosenClone.Spawns:GetChildren()
for i,v in pairs(game.Players:GetPlayers()) do
name = v.Name
check = game.Workspace:FindFirstChild(name)
if check then
checkHumanoid = check:FindFirstChild("Humanoid")
if checkHumanoid then
check:MoveTo(spawns[i].Position)
end
end

end
for i = 2, 1, -1 do
h.Text = "Time Lift: " .. i
wait (1)
end
--Countdown until the game ends
for i = 500, 1, -1 do
h.Text = "Time left: " .. i
wait(1)
end
h.Text = "Game Ended!"
wait(1)
gameChosenClone:Destroy()
else
h.Text = "There Needs To Be More Than One Player"
end
wait(5)
Report Abuse
mokmok74 is not online. mokmok74
Joined: 30 Apr 2010
Total Posts: 166
20 Mar 2015 12:52 PM
Wrong script



Code:

minigames = game.Lighting.Minigames:GetChildren()

h = Instance.new("Hint", game.workspace)

while true do

if game.Players.NumPlayers > 1 then
h.Text = "Deciding which map to play"
wait(10)
ranGame = math.random(3, #minigames)
gameChosen = minigames[ranGame]
h.Text = "Map chosen: " .. gameChosen.Name
wait(3)
h.Text = "Team DeathMatch!"
wait(2)
h.Text = "Get as much Tag as Possible!"
wait(4)
gameChosenClone = gameChosen:Clone()
gameChosenClone.Parent = game.Workspace
wait(4)
--Teleporting Players to Spawn.
spawns = gameChosenClone.Spawns:GetChildren()
for i,v in pairs(game.Players:GetPlayers()) do
name = v.Name
check = game.Workspace:FindFirstChild(name)
if check then
checkHumanoid = check:FindFirstChild("Humanoid")
if checkHumanoid then
check:MoveTo(spawns[i].Position)
end
end

end
for i = 2, 1, -1 do
h.Text = "Time Lift: " .. i
wait (1)
end
--Countdown until the game ends
for i = 500, 1, -1 do
h.Text = "Time left: " .. i
wait(1)
end
h.Text = "Game Ended!"
wait(1)
gameChosenClone:Destroy()
else
h.Text = "There Needs To Be More Than One Player"
end
wait(5)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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