|
| 09 Nov 2014 03:22 PM |
Ok so i have this script.
target = CFrame.new(228.4, 1.5, -121) --could be near a brick or in a new area pos = 228.4, 1.5, -189.4 WaitTime = 5 part = game.Workspace.poop5
dft = {}
function GetPlayers() local c = game.Players:GetChildren() for i = 1, #c do table.insert(dft, c[i].Name) end end
function Randomize() GetPlayers() local d = math.random(1, #dft) local s = d local g = Instance.new("Message", game.Workspace) g.Text = "Welcome to Five Nights at Freddys : Animatronics Version! The game will now pick a Animatronic..." wait(5) g:remove() local m = Instance.new("Message", game.Workspace) m.Text = "The Animatronic Person for this 70 seconds is... "..dft[s].."!" local rndm = game.Players:FindFirstChild(dft[s]) local Player = rndm.Character Player:MoveTo(Vector3.new(pos)) game.Workspace.teleporter1a.Script.Disabled=true wait(6) m:Remove() wait(0.1) local y = Instance.new("Message") y.Parent=game.Workspace y.Text = "Players Move Around to Teleport to the Map. 15 Seconds to do this..." game.Workspace.teleporter1a.Script.Disabled=false wait(15) game.Workspace.teleporter1a.Script.Disabled=true
y.Text = "Begin!" wait(3) y:remove() rndm.PlayerGui.CamFixGui.Fix1.Visible=true rndm.PlayerGui.CamFixGui.Fix2.Visible=true rndm.PlayerGui.CamFixGui.Fix3.Visible=true rndm.PlayerGui.CamFixGui.Fix4.Visible=true wait(70) local q=Instance.new("Message") q.Parent=game.Workspace q.Text = "Round Over Prepare for a new one!" for i, player in ipairs(game.Players:GetPlayers()) do if player.Character then local hum = player.Character:FindFirstChild('Humanoid') if hum then hum.Health = 0 end end end wait(5) end
while true do wait(WaitTime) Randomize() end
Long yes but easy to read (mainly). Anyways when i go into Play Solo Mode it works fine. But when i play it in Play mode it stops working. Can anyone tell me why? |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 09 Nov 2014 03:29 PM |
Is it a LocalScript? Is Filtering Enabled? If you put a print statement at the beginning, does it print?
all important |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2014 03:42 PM |
LocalScript = No its not
Filering Enabled = ?
Printing at the beginning : Yes it does
Errors in the F9 :
Workspace.JamG700's Random Player Picker:19: bad argument #2 to "random" (interval Empty) ^was in red^
Things to look at (in F9) Line 19-Randomize
Line 68
Tell me if you ned more info on whats going on with this |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 09 Nov 2014 03:43 PM |
e.e you didn't tell me there was an ERROR also, you should look up FilteringEnabled |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 09 Nov 2014 03:45 PM |
Huh, apparently the function isn't updating the variable.
Since you only use that function once, just replace the line where you call the function with the actual function
also, don't use :remove () |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2014 03:45 PM |
repeat -facedesk- until 2+2=5
Don't use free models and expect us to debug them, especially when its cod is more than 20 lines |
|
|
| Report Abuse |
|
|
| |
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
|
| 09 Nov 2014 03:46 PM |
dood dats my thang
leave my thang and get cho own thang |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 09 Nov 2014 03:47 PM |
| God this script is horrible (no offense to the creator)... |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2014 03:47 PM |
fine,
how about
while wait() do facepalm end |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2014 03:48 PM |
| oscar9999991: Your loop has a wait in it. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 09 Nov 2014 03:48 PM |
| I was talking about the OPs... I don't reply to stupid code that does not help. |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2014 03:48 PM |
| Ok lol just to explain the only thing the "original creator" did with this script was pick a random player... I wrote the rest. |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2014 03:53 PM |
Edited it a litle bit, same errors showed up
print("WASSSSUUUUUUUUUUUUUUUUUUUUPPPPPPPPPPPPPPPPPP") target = CFrame.new(228.4, 1.5, -121) --could be near a brick or in a new area pos = 228.4, 1.5, -189.4 WaitTime = 5 part = game.Workspace.poop5
dft = {} while true do wait(5) function GetPlayers() local c = game.Players:GetChildren() for i = 1, #c do table.insert(dft, c[i].Name) end end
GetPlayers() local d = math.random(1, #dft) local s = d local g = Instance.new("Message", game.Workspace) g.Text = "Welcome to Five Nights at Freddys : Animatronics Version! The game will now pick a Animatronic..." wait(5) g:remove() local m = Instance.new("Message", game.Workspace) m.Text = "The Animatronic Person for this 70 seconds is... "..dft[s].."!" local rndm = game.Players:FindFirstChild(dft[s]) local Player = rndm.Character Player:MoveTo(Vector3.new(pos)) game.Workspace.teleporter1a.Script.Disabled=true wait(6) m:Remove() wait(0.1) local y = Instance.new("Message") y.Parent=game.Workspace y.Text = "Players Move Around to Teleport to the Map. 15 Seconds to do this..." game.Workspace.teleporter1a.Script.Disabled=false wait(15) game.Workspace.teleporter1a.Script.Disabled=true
y.Text = "Begin!" wait(3) y:remove() rndm.PlayerGui.CamFixGui.Fix1.Visible=true rndm.PlayerGui.CamFixGui.Fix2.Visible=true rndm.PlayerGui.CamFixGui.Fix3.Visible=true rndm.PlayerGui.CamFixGui.Fix4.Visible=true wait(70) local q=Instance.new("Message") q.Parent=game.Workspace q.Text = "Round Over Prepare for a new one!" for i, player in ipairs(game.Players:GetPlayers()) do if player.Character then local hum = player.Character:FindFirstChild('Humanoid') if hum then hum.Health = 0 end end end wait(5) end
|
|
|
| Report Abuse |
|
|
|
| 09 Nov 2014 03:54 PM |
"Edited it a litle bit"
If by "edited it a little* bit" you mean "Added a print statement", get out. |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2014 03:56 PM |
The randomize statement was removed...
While true do was added.
Print statement was added...
I got rid of a function so they didnt loop each other, that's right right? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 09 Nov 2014 04:14 PM |
B3 Man this thread dropped quick...
|
|
|
| Report Abuse |
|
|
|
| 09 Nov 2014 04:15 PM |
| If you don't make something... Well... You should learn to make it yourself. |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2014 04:17 PM |
@not I've already explained that i made 3/4's of this script. This was basically all made by me...Also what crazy user doesnt use a small Free Model from time to time.... |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|