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: Round script(needs editing)

Previous Thread :: Next Thread 
flams2000 is not online. flams2000
Joined: 29 Apr 2009
Total Posts: 188
25 Jul 2011 01:58 PM
This script isn't working right. Line 35 breaks. Reply back with a fixed script. thanks


Map = game.Workspace.Maps
Map.Parent = game.Lighting
Maps = Map:GetChildren()

function New(Player)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local c = Instance.new("IntValue")
c.Name = "Cash"
c.Value = 0
c.Parent = stats
stats.Parent = newPlayer
end

function Message(Text, Time)
m = Instance.new("Message")
m.Parent = game.Workspace
m.Text = Text
wait(Time)
m:Remove()
end

function Timer(Msg, Time)
h = Instance.new("Hint")
h.Parent = game.Workspace
h.Text = tostring(Time)
wait(1)
for c=1,Time do
h.Text = Msg.. ": " ..tostring(Time - c)
wait(1)
end
h:Remove()
end

function RunMap(Num)
if game.Workspace:findFirstChild("Current") ~= nil then
game.Workspace.Current:Remove()
end
M = Instance.new("Model")
M.Parent = game.Workspace
M.Name = "Current"
C = Maps[Num]:Clone()
C.Parent = M
Message("The Map " ..C.Name.. " Has Been Selected", 5)
C:MoveTo(Vector3.new(0, 0, 0))
d = game.Players:GetChildren()
Timer("The Game Ends In", 150)
for i = 1, #d do
local a,b = pcall(function()
d[i].Character.Torso.CFrame = Vector3.new(1,1,1)
end)
end
if b then
print("Error: " ..b)
end

while true do
wait()
Players = game.Players:GetChildren()
if #Players == 0 then
Message("Waiting For A Player...", 5)
else
Timer("The Next Game Starts In", 30)
RunMap(math.random(1,#Maps))
end
end
Report Abuse
bellyboy99 is not online. bellyboy99
Joined: 27 Jan 2010
Total Posts: 433
25 Jul 2011 02:23 PM
Please post the line that is breaking and the output.
Report Abuse
aaronzepeda33 is not online. aaronzepeda33
Joined: 26 Aug 2009
Total Posts: 964
25 Jul 2011 02:30 PM
we are not going to count 35 lines, atleast show us what it is suppose to do and output
Report Abuse
duncan999007 is not online. duncan999007
Joined: 20 Mar 2010
Total Posts: 123
25 Jul 2011 02:32 PM
i dont know exactly what line is 35 cuz it could be positioned wrong (plus 35 looks fine) but this...
h.Text = Msg.. ": " ..tostring(Time - c)
should maybe be
h.Text = ""..Msg.. ": " ..tostring(Time - c)..""
Report Abuse
flams2000 is not online. flams2000
Joined: 29 Apr 2009
Total Posts: 188
25 Jul 2011 02:48 PM
repost of script:


Map = game.Workspace.Maps
Map.Parent = game.Lighting
Maps = Map:GetChildren()

function New(Player)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local c = Instance.new("IntValue")
c.Name = "Cash"
c.Value = 0
c.Parent = stats
stats.Parent = newPlayer
end

function Message(Text, Time)
m = Instance.new("Message")
m.Parent = game.Workspace
m.Text = Text
wait(Time)
m:Remove()
end

function Timer(Msg, Time)
h = Instance.new("Hint")
h.Parent = game.Workspace
h.Text = tostring(Time)
wait(1)
for c=1,Time do
h.Text = Msg.. ": " ..tostring(Time - c)
wait(1)
end
h:Remove()
end

function RunMap(Num) -- broken line
if game.Workspace:findFirstChild("Current") ~= nil then
game.Workspace.Current:Remove()
end
M = Instance.new("Model")
M.Parent = game.Workspace
M.Name = "Current"
C = Maps[Num]:Clone()
C.Parent = M
Message("The Map " ..C.Name.. " Has Been Selected", 5)
C:MoveTo(Vector3.new(0, 0, 0))
d = game.Players:GetChildren()
Timer("The Game Ends In", 150)
for i = 1, #d do
local a,b = pcall(function()
d[i].Character.Torso.CFrame = Vector3.new(1,1,1)
end)
end
if b then
print("Error: " ..b)
end

while true do
wait()
Players = game.Players:GetChildren()
if #Players == 0 then
Message("Waiting For A Player...", 5)
else
Timer("The Next Game Starts In", 30)
RunMap(math.random(1,#Maps))
end
end
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
25 Jul 2011 02:50 PM
Did you even write this script?
Report Abuse
flams2000 is not online. flams2000
Joined: 29 Apr 2009
Total Posts: 188
25 Jul 2011 02:52 PM
some. i had input from a friend
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
25 Jul 2011 02:58 PM
I'm curious, is this friend of yours named 'Free' and his last name is 'Models'?
Report Abuse
flams2000 is not online. flams2000
Joined: 29 Apr 2009
Total Posts: 188
25 Jul 2011 03:00 PM
no, Relrion...
Report Abuse
flams2000 is not online. flams2000
Joined: 29 Apr 2009
Total Posts: 188
25 Jul 2011 03:19 PM
script working. no need to post again
Report Abuse
bellyboy99 is not online. bellyboy99
Joined: 27 Jan 2010
Total Posts: 433
02 Aug 2011 12:46 PM
No Spectrumw, his friends name is "Bellyboy99". Thank you very much.
Report Abuse
flams2000 is not online. flams2000
Joined: 29 Apr 2009
Total Posts: 188
12 Aug 2011 09:39 AM
and relrion =3
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