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: Please help debug broken code

Previous Thread :: Next Thread 
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 05:16 PM
Time = 320
Maps = {"Thing"}
gamestart = false
numberofplayers = game.Players.NumPlayers

if numberofplayers >= 1 then
gamestart = true
end

if gamestart == true then
local currentmap = Maps[math.random(1,#Maps)]
game.Lighting.currentmap:Clone().Parent = game.Workspace
wait(Time)
local P = game.Players:GetChildren()
for i=1, 1 do
local RP = P[math.random(1,#P)]
if RP.Character ~= nil and RP ~= nil then
RP.Character.Name = "It"
local M = Instance.new("Message",game.Workspace)
M.Text = (RP.Name .. " is it!")
wait(4)
M.Text:remove()
RP.Torso.Position = Vector3.new(20, 20, 20)
wait(1)
local M = Istance.new("Message",game.Workspace)
M.Text = (RP.Name .. "has 60 seconds to hide!")
wait(60)
M:remove()
wait(1)
for _, player in pairs(game.Players:GetChildren()) do
if player ~= RP then
local char = player.Character
if char then
local torso = char.Torso
if torso then
torso.CFrame = CFrame.new(Vector3.new(0,0,0))
local M = Instance.new("Message",game.Workspace)
M.Text = ("60 seconds are up! Kill " ..RP.Name.. "to win!")
wait(4)
M:remove()
end
end
end
end
end
end
end
Report Abuse
adark is not online. adark
Joined: 13 Jan 2008
Total Posts: 6412
18 Aug 2013 05:17 PM
What's the output?
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 05:23 PM
I feel like a noob asking this, Is this output the result of the script?
Report Abuse
adark is not online. adark
Joined: 13 Jan 2008
Total Posts: 6412
18 Aug 2013 05:24 PM
Technically yes, but in this context I'm asking for what appears in the Output panel.

View>Output
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 05:25 PM
This is output

zars15's CFrame loaded
logging probability 0.97668385876034
not logging
15:25:16.440 - DataModel Loading http://www.roblox.com/asset/?id=126509737
Report Abuse
Vioxus is not online. Vioxus
Joined: 30 Jul 2013
Total Posts: 131
18 Aug 2013 05:25 PM
What does the output say?
Report Abuse
Vioxus is not online. Vioxus
Joined: 30 Jul 2013
Total Posts: 131
18 Aug 2013 05:26 PM
Oo i might know the problem!! Let me try something,give me a few moments.
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 05:32 PM
Ok
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 05:46 PM
This is taking awhile :c
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 05:53 PM
Bump
Report Abuse
Z4ckZ4k is not online. Z4ckZ4k
Joined: 07 Jul 2013
Total Posts: 160
18 Aug 2013 06:42 PM
Run the script, and you'll see an error in the output in red, paste it here.
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 06:49 PM
Thats the problem, How do I find output box?
Report Abuse
MattJon is not online. MattJon
Joined: 28 Apr 2009
Total Posts: 660
18 Aug 2013 06:49 PM
I see one thing. I don't think you can use a tag like that. I'm referring to the "currentmap".
Try map = Maps[math.random(1,#Maps)] and then currentmap = game.Lighting:FindFirstChild(map) and then currentmap:clone().Parent = game.Workspace. Other than that, the rest is way over my head.
Report Abuse
Z4ckZ4k is not online. Z4ckZ4k
Joined: 07 Jul 2013
Total Posts: 160
18 Aug 2013 06:49 PM
View>Output

Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 07:40 PM
Nothing comes up when I try to do output, I have disabled on false. I have tryed putting prints nothing comes out of output
Report Abuse
Cakins is not online. Cakins
Joined: 23 Jul 2009
Total Posts: 307
18 Aug 2013 07:43 PM
Keep in mind, the way you have the code set up, you would have to activate this script AFTER the required number of players have joined. It only checks the number of players in the game at the moment the script is loaded.
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 07:45 PM
I had that fixed, this is new one

Time = 320
Maps = {"Thing"}

repeat wait() until game.Players.NumPlayers > 0

local currentmap = Maps[math.random(1,#Maps)]
game.Lighting.currentmap:Clone().Parent = game.Workspace
wait(Time)
local P = game.Players:GetChildren()
for i=1, 1 do
local RP = P[math.random(1,#P)]
if RP.Character ~= nil and RP ~= nil then
RP.Character.Name = "It"
local M = Instance.new("Message",game.Workspace)
M.Text = (RP.Name .. " is it!")
wait(4)
M.Text:remove()
RP.Torso.Position = Vector3.new(20, 20, 20)
wait(1)
local M = Istance.new("Message",game.Workspace)
M.Text = (RP.Name .. "has 60 seconds to hide!")
wait(60)
M:remove()
wait(1)
for _, player in pairs(game.Players:GetChildren()) do
if player ~= RP then
local char = player.Character
if char then
local torso = char.Torso
if torso then
torso.CFrame = CFrame.new(Vector3.new(0,0,0))
local M = Instance.new("Message",game.Workspace)
M.Text = ("60 seconds are up! Kill " ..RP.Name.. "to win!")
wait(4)
M:remove()
end
end
end
end
end
end
Report Abuse
Cakins is not online. Cakins
Joined: 23 Jul 2009
Total Posts: 307
18 Aug 2013 07:51 PM
Based on what I see, this one should at least generate a map. Where is the problem at now?
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 08:13 PM
Nothing works, It doesnt even generate the map. I cant get output because it just doesnt work on my roblox studio. Can you take the script and try to do output?
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