Flasket
|
  |
| Joined: 20 Jan 2011 |
| Total Posts: 7639 |
|
|
| 07 Apr 2012 06:52 PM |
| Because when I go into Test mode my script runs perfectly, but as soon as I go into play mode the .ChildAdded event doesn't fire. |
|
|
| Report Abuse |
|
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 07 Apr 2012 06:54 PM |
| Show us the Script. Be sure to tell us whether it is a Script or a LocalScript. |
|
|
| Report Abuse |
|
|
Flasket
|
  |
| Joined: 20 Jan 2011 |
| Total Posts: 7639 |
|
|
| 07 Apr 2012 06:54 PM |
Well it's about 300 lines, I will show you the part using .ChildAdded.
Also it's in a localscript. |
|
|
| Report Abuse |
|
|
Flasket
|
  |
| Joined: 20 Jan 2011 |
| Total Posts: 7639 |
|
|
| 07 Apr 2012 06:55 PM |
game.Players.LocalPlayer.CharacterAdded:connect(function() char = game.Players.LocalPlayer.Character rotatepart,weld = weldArms(char) game.Players.LocalPlayer.Character.ChildAdded:connect(function(child) if child.Name == "Bomb" then weld.Part0 = char["Right Arm"] weld.Part1 = child.BombPart armout(rotatepart,game.Players.LocalPlayer.Character) end end) game.Players.LocalPlayer.Character.ChildRemoved:connect(function(child) if child.Name == "Bomb" then armdown(rotatepart,game.Players.LocalPlayer.Character) end end) end) |
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 07 Apr 2012 07:14 PM |
| Where is this localscript in-game? |
|
|
| Report Abuse |
|
|
Flasket
|
  |
| Joined: 20 Jan 2011 |
| Total Posts: 7639 |
|
|
| 07 Apr 2012 08:19 PM |
| It's located in a player backpack. |
|
|
| Report Abuse |
|
|
|
| 07 Apr 2012 08:20 PM |
I've had problems with this too :| I don't think it works. |
|
|
| Report Abuse |
|
|
Flasket
|
  |
| Joined: 20 Jan 2011 |
| Total Posts: 7639 |
|
|
| 07 Apr 2012 08:25 PM |
Well that's dissapointing.
Guess I have to work around it.
|
|
|
| Report Abuse |
|
|
|
| 07 Apr 2012 09:18 PM |
It's quite an important part in my Dynamic Pathfinding AI P_P |
|
|
| Report Abuse |
|
|
|
| 07 Apr 2012 10:03 PM |
It does work. And it doesn't surprise me that your script is a LocalScript and only works in play solo.
99% of problems with scripts that work in play solo/build mode but not online happen in LocalScripts because of a stupid mistake from the people who wrote them.
This is why you should never test your scripts in play solo or build mode. Either online, either with the start server option. |
|
|
| Report Abuse |
|
|