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: Ugh...

Previous Thread :: Next Thread 
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
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 is not online. 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
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
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 is not online. 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 is not online. 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
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
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
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
09 Nov 2014 03:46 PM
Code*
Report Abuse
iiEssence is not online. 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 is not online. 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
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
09 Nov 2014 03:47 PM
fine,

how about

while wait() do
facepalm
end
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
09 Nov 2014 03:48 PM
oscar9999991: Your loop has a wait in it.
Report Abuse
cntkillme is not online. 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
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
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
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
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
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
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
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
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
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
09 Nov 2014 04:01 PM
B1
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
09 Nov 2014 04:05 PM
B2
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
09 Nov 2014 04:14 PM
B3 Man this thread dropped quick...

Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
09 Nov 2014 04:15 PM
If you don't make something... Well... You should learn to make it yourself.
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
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
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
09 Nov 2014 04:24 PM
B4
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
09 Nov 2014 04:31 PM
B5
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
09 Nov 2014 04:35 PM
B6
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
09 Nov 2014 04:38 PM
B7
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