andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 04:52 AM |
Hello, this script doesn't work can anyone fix it?
game.Players.PlayerAdded:connect(function(plyr) game.Lighting.Part1:Clone().Parent=plyr.Character game.Lighting.PartCon:Clone().Parent=plyr.PlayerGui wait(10) plyr.PlayerGui.PartCon:remove() game.Lighting.Fix:Clone().Parent=plyr.Character plyr.Character.Fix:remove() end)
~Andreas98~ |
|
|
| Report Abuse |
|
|
1WOOF1
|
  |
| Joined: 03 May 2009 |
| Total Posts: 20682 |
|
| |
|
andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 04:59 AM |
Thanks, but still don't work and the scripts that the script clones should work because when I make the script:
plyr=game.Players.andreas98
game.Lighting["Part1"]:Clone().Parent=plyr.Character game.Lighting.PartCon:Clone().Parent=plyr.PlayerGui wait(10) plyr.PlayerGui.PartCon:remove() game.Lighting.Fix:Clone().Parent=plyr.Character plyr.Character.Fix:remove()
Then it works.
|
|
|
| Report Abuse |
|
|
1WOOF1
|
  |
| Joined: 03 May 2009 |
| Total Posts: 20682 |
|
| |
|
andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 05:12 AM |
I think they work because if I made the script
game.Players.PlayerAdded:connect(function(plyr) plyr.Character["Left Leg"]:remove() end)
Then it still doesn't work. |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2011 05:31 AM |
function onPlayerEntered(player) Player.Character["Left Leg"]:remove() end
game.Players.PlayerAdded:connect(onPlayerEntered) |
|
|
| Report Abuse |
|
|
andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 05:37 AM |
| Not really what I needed, but now I will read all my script to see if I can find any errors.. |
|
|
| Report Abuse |
|
|
andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 10:13 AM |
| I can still not find any errors, any other ideas? |
|
|
| Report Abuse |
|
|
Diebrox
|
  |
| Joined: 17 Sep 2009 |
| Total Posts: 4716 |
|
| |
|
|
| 17 Oct 2011 10:23 AM |
game.Players.PlayerAdded:connect(function(plyr) plyr.CharacterAdded:connect(function(char) game.Lighting.Part1:Clone().Parent=char game.Lighting.PartCon:Clone().Parent=plyr.PlayerGui game:GetService("Debris"):AddItem(plyr.PlayerGui.PartCon,10) game.Lighting.Fix:Clone().Parent=char
plyr.Character.Fix:remove() -- [[not sure why you want to remove it when you just cloned it..]] end) |
|
|
| Report Abuse |
|
|
andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 10:46 AM |
| Its because the "Fix" script edit the camera to the normal view. |
|
|
| Report Abuse |
|
|
andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 10:55 AM |
| Thanks, but it still doesn't work.. Any other ideas? |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 17 Oct 2011 11:01 AM |
UttermostExedra's script does work..
|
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
| |
|
andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 11:02 AM |
| Uhmm yes, I know that, but can anything fix it? |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 17 Oct 2011 11:03 AM |
game.Players.PlayerAdded:connect(function(plyr) plyr.CharacterAdded:connect(function(char) game.Lighting.Part1:Clone().Parent=char game.Lighting.PartCon:Clone().Parent=plyr.PlayerGui game:GetService("Debris"):AddItem(plyr.PlayerGui.PartCon,10) game.Lighting.Fix:Clone().Parent=char plyr.Character.Fix:remove() end) end)
? |
|
|
| Report Abuse |
|
|
andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 11:11 AM |
| Still doesn't work, any other ideas? |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 17 Oct 2011 11:12 AM |
| The most likely issue you're testing in solo, in which the player enters before the script loads. You could fix it by separating the function from the connection and creating a loop that automatically runs the function for players already in the server. |
|
|
| Report Abuse |
|
|
andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 11:13 AM |
| But, I test it in play mode and it only need to be runned when the player enter the game. |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 17 Oct 2011 11:15 AM |
| If the server is already open and a new player opens, does it work then? You should probably add my suggestion anyway as a matter of precaution. |
|
|
| Report Abuse |
|
|
andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 11:17 AM |
| Ill try to get another player to join after I joined, thanks. |
|
|
| Report Abuse |
|
|
andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 12:34 PM |
| I tryed to join while anotherone was in the game, but it still doesn't work. Any other ideas? |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 17 Oct 2011 12:37 PM |
| It could be that the PlayerGui or the Character hasn't loaded immediately. |
|
|
| Report Abuse |
|
|
andreas98
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 246 |
|
|
| 17 Oct 2011 12:53 PM |
| But the other player had played the game about 2 min before I joined. |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2011 12:56 PM |
| are there another scripts that you used cause sometimes one script can stop another script |
|
|
| Report Abuse |
|
|