|
| 19 Aug 2011 12:55 PM |
function OnPlayerAdded(player) if player.Name =/ "hithere4994" then player:Remove() else end
game.Players.PlayerAdded:connect(ope)
With this, output calls for a then near the =, which is there. When I change =/ to =/=, it's the same thing. When I change it to ==/, it says that there's an unexpected symbol near the =. |
|
|
| Report Abuse |
|
|
l0lzz
|
  |
| Joined: 05 Dec 2009 |
| Total Posts: 1529 |
|
|
| 19 Aug 2011 12:55 PM |
function OnPlayerAdded(player) if player.Name == "hithere4994" then player:Remove() else end
game.Players.PlayerAdded:connect(ope)
|
|
|
| Report Abuse |
|
|
MXrcr20
|
  |
| Joined: 01 Oct 2008 |
| Total Posts: 2644 |
|
|
| 19 Aug 2011 12:56 PM |
function OnPlayerAdded(player) if player.Name ~= "hithere4994" then player:Remove() else end
game.Players.PlayerAdded:connect(ope) |
|
|
| Report Abuse |
|
|
l0lzz
|
  |
| Joined: 05 Dec 2009 |
| Total Posts: 1529 |
|
|
| 19 Aug 2011 12:56 PM |
Ooops, Correction,
function OnPlayerAdded(player) if player.Name =/ "hithere4994" then player:Remove() else end
game.Players.PlayerAdded:connect(OnPlayerAdded)
|
|
|
| Report Abuse |
|
|
MXrcr20
|
  |
| Joined: 01 Oct 2008 |
| Total Posts: 2644 |
|
|
| 19 Aug 2011 12:57 PM |
oops...
game.Players.PlayerAdded:connect(OnPlayerAdded) |
|
|
| Report Abuse |
|
|
l0lzz
|
  |
| Joined: 05 Dec 2009 |
| Total Posts: 1529 |
|
|
| 19 Aug 2011 12:57 PM |
Lol sorry, my script is fail, final correction
function OnPlayerAdded(player) if player.Name ~= "hithere4994" then player:Remove() else end
game.Players.PlayerAdded:connect(OnPlayerAdded)
|
|
|
| Report Abuse |
|
|
|
| 19 Aug 2011 12:57 PM |
function OnPlayerAdded(player) if player.Name == "hithere4994" then player:Remove() else end
game.Players.PlayerAdded:connect(ope) ____________________________________________________________________________
The script I am trying to fix is to remove all players except me upon entering. The one you provided is to remove only me upon entering. |
|
|
| Report Abuse |
|
|
MXrcr20
|
  |
| Joined: 01 Oct 2008 |
| Total Posts: 2644 |
|
|
| 19 Aug 2011 12:58 PM |
Lol fail... :D
2X late posts. -50XP :( |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2011 12:58 PM |
| Haha, you guys post too fast :P |
|
|
| Report Abuse |
|
|
Spectrumz
|
  |
| Joined: 22 Mar 2011 |
| Total Posts: 4338 |
|
|
| 19 Aug 2011 12:58 PM |
game.Players.PlayerAdded:connect(function(p) if p.Name ~= "hithere4994" then p:Remove() end end) |
|
|
| Report Abuse |
|
|
l0lzz
|
  |
| Joined: 05 Dec 2009 |
| Total Posts: 1529 |
|
|
| 19 Aug 2011 12:59 PM |
Lol,
Me and MX fail, we forgot the ends... |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2011 01:01 PM |
| You know that it works when you get an error message that LoadCharacter can't be called. |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2011 04:18 PM |
I altered it to make it let people who are friends with one of my alts in, and it quit working.
game.Players.PlayerAdded:connect(function(p) if p:IsFriendsWith(1484093) then p:Remove() end end) |
|
|
| Report Abuse |
|
|