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: Script not working, Can anybody tell me whats wrong?

Previous Thread :: Next Thread 
inject0r is not online. inject0r
Joined: 21 Jul 2012
Total Posts: 405
29 Jul 2012 04:23 PM
while true do
if game.Workspace.Players.inject0r == nil then
print(" INJECT0R IS HERE")
else
print("inject0r not found")
a = game.Workspace.Players:GetChildren
a:Remove()
end



I dont get it, whats wrong?
Report Abuse
Strieken is not online. Strieken
Joined: 17 Jun 2011
Total Posts: 3058
29 Jul 2012 04:27 PM
while true do
wait(.5) -- You can change this to any number, it's to keep the loop from crashing the game.
if game.Workspace.Players.inject0r == nil then
print("INJECT0R IS HERE") -- Don't know why you would want to print it's there if it's nil..
else
print("inject0r not found")
a = game.Players:GetChildren()
a:Destroy() -- :Remove() was deprecated some months ago.
end
end
Report Abuse
Strieken is not online. Strieken
Joined: 17 Jun 2011
Total Posts: 3058
29 Jul 2012 04:30 PM
Whoops, I forgot to correct your mistake on the third line:

if game.Players.inject0r == nil then*
Report Abuse
inject0r is not online. inject0r
Joined: 21 Jul 2012
Total Posts: 405
29 Jul 2012 04:31 PM
How come I didnt get the inject0r not here output instead I got


inject0r is not a valid member of Players
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
29 Jul 2012 04:32 PM
while wait(0.5) do
if not Game.Players:FindFirstChild("inject0r") then
Game.Players:ClearAllChildren()
end
end

† KMXD † - Evil Duck Overlord, bent on world domination.
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