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: So i..

Previous Thread :: Next Thread 
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 03:11 PM
So i have this script :

Model = game.Workspace.Scares

game.Players.PlayerAdded:connect(function(plr)
local nub = math.random(1,#Model:GetChildren())
local lol = nub:Clone()
lol.Parent = plr
lol.Disabled = false
end)

What it should do is when a player enters it at random selects a script and undisable it. It's stopped working for some reason. Can anyone tell me why and how to fix it?
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
29 Sep 2014 03:12 PM
game.Players.PlayerAdded:connect(function(plr)
local chil = Model:GetChildren()
local nub = chil[math.random(1,#Model:GetChildren())]
local lol = nub:Clone()
lol.Parent = plr
lol.Disabled = false
end)
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
29 Sep 2014 03:14 PM
Sorry typed in a hurry

game.Players.PlayerAdded:connect(function(plr)
local chil = Model:GetChildren()
local nub = chil[math.random(1,#chil)]
local lol = nub:Clone()
lol.Parent = plr
lol.Disabled = false
end)
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 03:18 PM
Did this :
Model = game.Workspace.Scares

game.Players.PlayerAdded:connect(function(plr)
local chil = Model:GetChildren()
local nub = chil[math.random(1,#chil)]
local lol = nub:Clone()
lol.Parent = plr
lol.Disabled = false
end)

So in Workspace Theres a model called Scares and it has 2 scripts inside of it. For some reason it didn't undisable any of them.
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 03:27 PM
B1
Report Abuse
Bobobob12 is not online. Bobobob12
Joined: 23 Jan 2008
Total Posts: 5350
29 Sep 2014 03:27 PM
Model = game.Workspace.Scares

game.Players.PlayerAdded:connect(function(plr)
local chil = Model:GetChildren()
local nub = chil[math.random(1,#chil)]
local lol = nub:Clone()
lol.Disabled = false
lol.Parent = plr
end)

disable it before you parent it, parenting it causes it to run
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 03:33 PM
Still a no go
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 03:40 PM
What i do to check it is i press Play in Studio and look at the scares scripts and click on each one of them, looking at the properties window to see if they're disabled. Both of them are.
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 04:01 PM
B2
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 04:12 PM
B3
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 04:20 PM
B4
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 04:30 PM
Sorry for the bumps, i dont understand why this wont work lol
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 04:39 PM
B5
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 04:56 PM
B6
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 05:36 PM
B7
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 05:42 PM
B8
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
29 Sep 2014 06:28 PM
B9
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