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

Previous Thread :: Next Thread 
montanaontario2392 is not online. montanaontario2392
Joined: 24 Mar 2010
Total Posts: 545
30 May 2013 05:36 PM
Why won't this work?

while true do
wait (0.0000001)
c=game.Players:FindFirstChild("Player")
if c.Name == "montanaontario2392" then return end
if c~= nil then
c :remove()
else
end
end

No output
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
30 May 2013 05:37 PM
if c~= nil then


I have no idea what this means.
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 05:38 PM
it means if there is no player.
nil = nothing.
c = player.
Report Abuse
montanaontario2392 is not online. montanaontario2392
Joined: 24 Mar 2010
Total Posts: 545
30 May 2013 05:38 PM
It means like if the item is there.
or something.
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 05:38 PM
Probably because of all the decimal places in wait(). I don't think ROBLOX allows such a small decimal... Try to stay within the thousandths.
Report Abuse
montanaontario2392 is not online. montanaontario2392
Joined: 24 Mar 2010
Total Posts: 545
30 May 2013 05:39 PM
No it does.

Ive had

wait (0.000000000000000000000000000000000000000000000000001)

and it still worked.
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 05:41 PM
Pro tip-

Using wait() with no numbers will wait the shortest amount of time roblox can wait.
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 05:42 PM
oo u pro
Report Abuse
montanaontario2392 is not online. montanaontario2392
Joined: 24 Mar 2010
Total Posts: 545
30 May 2013 05:47 PM
Bump
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 05:51 PM
Your trying to remove every person apart from yourself?
Report Abuse
montanaontario2392 is not online. montanaontario2392
Joined: 24 Mar 2010
Total Posts: 545
30 May 2013 05:52 PM
Yes that's about it.
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 05:55 PM
try this.

while true do
wait ()
players = game.Players:GetChildren()
for i=1, #players do
if players[i].Name == "montanaontario2392" then
return
end
if players[i]~= nil then
players[i] :remove()
end
end
end
Report Abuse
montanaontario2392 is not online. montanaontario2392
Joined: 24 Mar 2010
Total Posts: 545
30 May 2013 06:10 PM
Didn't work.
Report Abuse
MemoryAddress is not online. MemoryAddress
Joined: 20 Apr 2013
Total Posts: 1297
30 May 2013 06:12 PM
[ Content Deleted ]
Report Abuse
montanaontario2392 is not online. montanaontario2392
Joined: 24 Mar 2010
Total Posts: 545
30 May 2013 06:53 PM
Bump..
Report Abuse
SamHuckaby is not online. SamHuckaby
Joined: 04 Dec 2012
Total Posts: 59
30 May 2013 06:58 PM
c=game.Players:FindFirstChild("Player")

^This will only work if the player named "Player" is in your game.
Report Abuse
montanaontario2392 is not online. montanaontario2392
Joined: 24 Mar 2010
Total Posts: 545
30 May 2013 07:00 PM
How would I change it to find every player within the game then?
Report Abuse
Figure65 is not online. Figure65
Joined: 23 May 2007
Total Posts: 2663
30 May 2013 07:06 PM
game.Players.PlayerAdded:connect(function(Player)
if Player.Name ~="montanaontario2392" then print("mon")
else do end
Player:Remove()
end
end)


try this
Report Abuse
montanaontario2392 is not online. montanaontario2392
Joined: 24 Mar 2010
Total Posts: 545
30 May 2013 07:09 PM
Would this work?

workspace.ChildAdded:connect(function(item)
if item:IsA("Player")
wait(1)
if item.Name == "montanaontario2392" then return end
if item.Parent == game.Players then
item:Destroy()
end
end
end)
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
30 May 2013 07:15 PM
No, because the 'item.Parent' would always be Workspace...

---
If you want the script to bare entry, then Memory's script is what you're looking for. You're trying to over-complicate things.
Report Abuse
Figure65 is not online. Figure65
Joined: 23 May 2007
Total Posts: 2663
30 May 2013 07:16 PM
i=game.Players:FindFirstChild("Player")
while true do
if i.Name=="montanaontario2392" then do print("yolo") else do end
i:Remove()
end
end
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
30 May 2013 07:17 PM
@Figure,
What are you even doing... e.e
Report Abuse
montanaontario2392 is not online. montanaontario2392
Joined: 24 Mar 2010
Total Posts: 545
30 May 2013 07:18 PM
game.Players.ChildAdded:connect(function(item)
if item:IsA("Player")
wait(1)
if item.Name == "montanaontario2392" then return end
if item.Parent == game.Players then
item:Destroy()
end
end
end)

?
Report Abuse
Figure65 is not online. Figure65
Joined: 23 May 2007
Total Posts: 2663
30 May 2013 07:18 PM
@desp
I don't even know anymore :D
Report Abuse
montanaontario2392 is not online. montanaontario2392
Joined: 24 Mar 2010
Total Posts: 545
30 May 2013 07:21 PM
pls..
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