lowvillan
|
  |
| Joined: 14 Sep 2010 |
| Total Posts: 725 |
|
|
| 04 Jan 2015 08:53 PM |
i have a script that puts a script in a player, then enable it so it can do stuff, however, when the script is put into the player, it doesn't even run, even though it isn't disabled.
script that puts other script into the player: game.Players.PlayerAdded:connect(function(plr) plr:WaitForChild("Character") local oc = script.OnDeath:Clone() oc.Parent = plr oc.Disabled = false end)
|
|
|
| Report Abuse |
|
|
|
| 04 Jan 2015 08:55 PM |
| plr:WaitForChild("Character.Humanoid") |
|
|
| Report Abuse |
|
|
lowvillan
|
  |
| Joined: 14 Sep 2010 |
| Total Posts: 725 |
|
| |
|
|
| 04 Jan 2015 09:01 PM |
game.Players.PlayerAdded:connect(function(plr) plr:WaitForChild("Character") local oc = script.OnDeath:Clone() oc.Disabled = false oc.Parent = plr end) |
|
|
| Report Abuse |
|
|
lowvillan
|
  |
| Joined: 14 Sep 2010 |
| Total Posts: 725 |
|
|
| 04 Jan 2015 09:06 PM |
still, no.
i have also noticed that waitforchild doesn't seem to work well with this script, as it simply waits, and nothing happens. |
|
|
| Report Abuse |
|
|
BioMatrix
|
  |
| Joined: 22 Mar 2014 |
| Total Posts: 693 |
|
|
| 04 Jan 2015 09:07 PM |
| You could try and ask the scripters in the scripters forum they might know |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2015 09:11 PM |
nvm that doesn't help, I think I found your problem though.
>script.OnDeath:Clone()
I don't think scripts can die?
local script = --Idk what script you are giving
game.Players.PlayerAdded:connect(function(plr) local char = plr:WaitForChild("Character") char.Humanoid.Died:connect(function() local oc = script:clone() oc.Parent = plr oc.Disabled = false end) end) |
|
|
| Report Abuse |
|
|