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: OnPlayerAdded

Previous Thread :: Next Thread 
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
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 is not online. 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 is not online. 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 is not online. 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 is not online. MXrcr20
Joined: 01 Oct 2008
Total Posts: 2644
19 Aug 2011 12:57 PM
oops...

game.Players.PlayerAdded:connect(OnPlayerAdded)
Report Abuse
l0lzz is not online. 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
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
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 is not online. MXrcr20
Joined: 01 Oct 2008
Total Posts: 2644
19 Aug 2011 12:58 PM
Lol fail... :D

2X late posts. -50XP :(
Report Abuse
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
19 Aug 2011 12:58 PM
Haha, you guys post too fast :P
Report Abuse
Spectrumz is not online. 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 is not online. 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
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
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
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
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
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