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: Yikes -- Whats wrong?

Previous Thread :: Next Thread 
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
24 Apr 2014 06:46 PM
plrs = game.Players:GetPlayers()
maps = game.Lighting:GetChildren()
numplrs = #plrs
function selectMAP()
selectedMap = maps[math.random(1,#maps)]
selectedMap.Parent = Workspace
game.Workspace.Timer.Value = 301
repeat
wait(1)
game.Workspace.Timer.Value = game.Workspace.Timer.Value - 1
until
game.Workspace.Timer.Value == 1 or numplrs == 1
----
m = Instance.new("Message", Workspace)
if game.Workspace.Timer.Value == 1 then
m.Text = "There was no winner, time ran out."
wait(5)
m:Destroy()
selectedMap:Destroy()
script.Disabled = true
end
if numplrs == 1 then
m.Text = "The winner was: "..plrs[1]
wait(5)
m:Destroy()
selectedMap:Destroy()
script.Disabled = true
end
end
while wait() do
for i,v in pairs(game.Players:GetPlayers()) do
if v.Character.Humanoid.Health == 0 then
table.remove(v.Character.Name, plrs)
end
end
end
function tp()
local spawns = selectedMap.Spawns
for i = 1, numplrs do
plrs[i]:MoveTo(spawns[i].Position)
sword = game.ServerStorage["Sword"]
end
end
if Workspace.GoReady.Value == true then
selectMAP()
tp()
Workspace.GoReady.Value = false
end

Everything is correct
I have no errors in-game
except
'Content failed because Could not upload' or something
Report Abuse
LuminaDeVis is not online. LuminaDeVis
Joined: 14 Apr 2013
Total Posts: 34
24 Apr 2014 07:05 PM
Could you explain what you are trying to do, and what exactly it is not doing? Don't just say that it "just isn't doing anything", try to figure out which parts it gets to. A easy way to tell is to put print("hello") or something like that inside functions and loops. If you print the function name or loop, you can tell which is being run and which is not.
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
24 Apr 2014 07:28 PM
put in prints
prints nothing
Report Abuse
LuminaDeVis is not online. LuminaDeVis
Joined: 14 Apr 2013
Total Posts: 34
24 Apr 2014 07:32 PM
With your first if statement, you disabled the script before calling the function before it. Why do you need to disable the script?
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
24 Apr 2014 07:40 PM
There is a script that renables if the script is deanbled
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
24 Apr 2014 07:44 PM
re-enables
if
disabled
also
here is the game that's broken
http://www.roblox.com/Laundry-Day-Sword-Fighting-Simulation-place?id=154145112
LezMakeAGame is the main script
Script is the one that disables
Report Abuse
LuminaDeVis is not online. LuminaDeVis
Joined: 14 Apr 2013
Total Posts: 34
24 Apr 2014 07:52 PM
Try changing Script to
Workspace.LozMakeAGame.Changed:connect(function()
if Workspace.LezMakeAGame.Disabled == true then
if game.Players.NumPlayers >= 1 then
wait(1)
Workspace.LezMakeAGame.Disabled = false
if game.Workspace.GoReady.Value == false then
game.Workspace.GoReady.Value = true
end
end
end
end)
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
24 Apr 2014 08:10 PM
Content failed because not found

what does this mean?
Join the game
cx
Report Abuse
Halpar is not online. Halpar
Joined: 21 Apr 2014
Total Posts: 91
24 Apr 2014 08:23 PM
it means you either did not name the map well , or you did not put it in the right place .-.
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
24 Apr 2014 08:24 PM
look at the game
nothing wrong.
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
24 Apr 2014 10:24 PM
Help
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
24 Apr 2014 11:02 PM
Are you people just lazy or don't like to help.
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
24 Apr 2014 11:03 PM
well
here is what I have now:
plrs = game.Players:GetPlayers()
maps = game.Lighting:GetChildren()
numplrs = #plrs
p = print
function selectMAP()
selectedMap = maps[math.random(1,#maps)]
selectedMap.Parent = Workspace
game.Workspace.Timer.Value = 301
p('1')
repeat
wait(1)
game.Workspace.Timer.Value = game.Workspace.Timer.Value - 1

until
game.Workspace.Timer.Value == 1 or numplrs == 1
p'2'
----
m = Instance.new("Message", Workspace)
if numplrs == 1 then
m.Text = "The winner was: "..plrs[1]
wait(5)
m:Destroy()
selectedMap:Destroy()
script.Disabled = true
end
if game.Workspace.Timer.Value == 1 then
m.Text = "There was no winner, time ran out."
wait(5)
m:Destroy()
selectedMap:Destroy()
script.Disabled = true
end
p'3'
end
while wait() do
for i,v in pairs(game.Players:GetPlayers()) do
if v.Character.Humanoid.Health == 0 then
table.remove(plrs,i)
p'4'
end
end
end
function tp()
local spawns = selectedMap.Spawns
for i = 1, numplrs do
plrs[i]:MoveTo(spawns[i].Position)
p'5'
sword = game.ServerStorage["Sword"]
end
end
if Workspace.GoReady.Value == true then
selectMAP()
p'6'
tp()
p'7'
Workspace.GoReady.Value = false
end
Report Abuse
deathkiller554 is not online. deathkiller554
Joined: 26 Jul 2011
Total Posts: 201
24 Apr 2014 11:10 PM
Try changing Script to
Workspace.LozMakeAGame.Changed:connect(function()
if Workspace.LezMakeAGame.Disabled == true then
if game.Players.NumPlayers >= 1 then
wait(1)
Workspace.LezMakeAGame.Disabled = false
if game.Workspace.GoReady.Value == false then
game.Workspace.GoReady.Value = true
end
end
end
end)

Is supposed to be...

Try changing Script to
Workspace.LezMakeAGame.Changed:connect(function() --You spelled it wrong. <.<
if Workspace.LezMakeAGame.Disabled == true then
if game.Players.NumPlayers >= 1 then
wait(1)
Workspace.LezMakeAGame.Disabled = false
if game.Workspace.GoReady.Value == false then
game.Workspace.GoReady.Value = true
end
end
end
end)
Report Abuse
deathkiller554 is not online. deathkiller554
Joined: 26 Jul 2011
Total Posts: 201
24 Apr 2014 11:11 PM
So in reality just...

Try changing Script to
Workspace.LezMakeAGame.Changed:connect(function()
if Workspace.LezMakeAGame.Disabled == true then
if game.Players.NumPlayers >= 1 then
wait(1)
Workspace.LezMakeAGame.Disabled = false
if game.Workspace.GoReady.Value == false then
game.Workspace.GoReady.Value = true
end
end
end
end)
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
24 Apr 2014 11:24 PM
Thankyou for trying
Report Abuse
Halpar is not online. Halpar
Joined: 21 Apr 2014
Total Posts: 91
24 Apr 2014 11:52 PM
the thing is if u don't disable it the script will not work,
but if u disable it the script destroys the property
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
24 Apr 2014 11:59 PM
Localize m = to local m =.
Report Abuse
iOffensive is not online. iOffensive
Joined: 13 Jun 2013
Total Posts: 416
25 Apr 2014 12:00 AM
Try this

plrs = game.Players:GetPlayers()
maps = game.Lighting:GetChildren()
numplrs = #plrs
p = print
function selectMAP()
selectedMap = maps[math.random(1,#maps)]
selectedMap.Parent = Workspace
game.Workspace.Timer.Value = 301
p('1')
repeat
wait(1)
game.Workspace.Timer.Value = game.Workspace.Timer.Value - 1

until
game.Workspace.Timer.Value == 1 or numplrs == 1
p'2'
----
m = Instance.new("Message", Workspace)
if numplrs == 1 then
m.Text = "The winner was: "..plrs[1]
wait(5)
m:Destroy()
selectedMap:Destroy()
end
if game.Workspace.Timer.Value == 1 then
m.Text = "There was no winner, time ran out."
wait(5)
m:Destroy()
selectedMap:Destroy()
wait(1)
end
p'3'
end
while wait() do
for i,v in pairs(game.Players:GetPlayers()) do
if v.Character.Humanoid.Health == 0 then
table.remove(plrs,i)
p'4'
end
end
end
function tp()
local spawns = selectedMap.Spawns
for i = 1, numplrs do
plrs[i]:MoveTo(spawns[i].Position)
p'5'
sword = game.ServerStorage["Sword"]
end
end
if Workspace.GoReady.Value == true then
selectMAP()
p'6'
tp()
p'7'
Workspace.GoReady.Value = false
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