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: Argh! Help!!

Previous Thread :: Next Thread 
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
29 Feb 2012 02:37 PM
What is the problem in this problem?

while true do
wait()

clear = {"TTTroy", "Player"}

local work = game.Workspace:GetChildren()
for x=1, #work do
for i,v in pairs(clear) do
if work[x].Name ~= v and work.Name ~= "Terrain" then
work[x]:remove()
end

end
end
end

Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
29 Feb 2012 02:38 PM
Use my script in the OTHER thread. . .

† KMXD †
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
29 Feb 2012 02:39 PM
Argh, wait, no. Let me fix it.

† KMXD †
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
29 Feb 2012 02:41 PM
Try this, the other would attempt to destroy everything in workspace that isn't you, and would error trying to delete Terrain.

clear = {["TTTroy"] = true , ["Player"] = true , ["Friend"] = true , ["Someotherfriend"] = true}

while wait() do
for _,v in pairs(game.Workspace:GetChildren()) do
if v:FindFirstChild("Humanoid") and not clear[v.Name] then
v:Destroy()
end
end
end

† KMXD †
Report Abuse
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
29 Feb 2012 02:42 PM
I was going to say :3
Report Abuse
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
29 Feb 2012 02:44 PM
Still doesn't work... There's no problems that say in the output in either mine or yours...
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
29 Feb 2012 02:47 PM
From what I can see, you're trying to destroy everyone who isn't you or your friends, are you testing with an alt, because it would let you live.

† KMXD †
Report Abuse
GrandAwsome is not online. GrandAwsome
Joined: 12 Jul 2011
Total Posts: 326
29 Feb 2012 02:48 PM
What do you want it to do?
Report Abuse
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
29 Feb 2012 02:52 PM
@GrandAwesome, what KnightmareXD said
@KnightmareXD, No I'm on my alt because my main got banned for a REALLLY stupid and funny reason.
Report Abuse
pinadam is not online. pinadam
Joined: 18 Sep 2010
Total Posts: 5
29 Feb 2012 02:53 PM
It could be that there are errors not in the output,but somewhere else....
Report Abuse
GrandAwsome is not online. GrandAwsome
Joined: 12 Jul 2011
Total Posts: 326
29 Feb 2012 02:58 PM
looks to me your like your trying to destroy everything...
this is a script to destroy every one though...

clear = {"TTTroy", "Player"}

while true do
wait()
local work = game.Players:GetPlayers()
for a = 1, #work do
for b = 1, #clear do
if work[a].Name ~= clear[b] then
work[a]:remove()
end
end
end
end

if this is going to run all the time though, do this...

clear = {"TTTroy", "Player"}


game.Player.PlayerAdded:connect(function(player)
player.CharacterAdded:wait()
for i = 1, #clear do
if player.Name ~= clear[b] then
player.Character:remove()
end
end
end)
Report Abuse
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
29 Feb 2012 03:09 PM
Well... It's in a different script it needs a loop to make the other stuff it has in it work... I could make two seperate scripts but I wanna see if I could make it all together. It's not the original script...
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
29 Feb 2012 03:10 PM
Then how do you know my script doesn't work? .3.

† KMXD †
Report Abuse
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
29 Feb 2012 03:12 PM
Me: C+P script
Me: Play solo
Camera: Removed
Otherstuff: Not removed
Me: Confused
Me: Stressed and kill eggs.
Report Abuse
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
29 Feb 2012 03:13 PM
Oh I forgot one part:
Output: Nuthin bad
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
29 Feb 2012 03:15 PM
My script is supposed to destroy players that aren't you or your friends, so test it with another alt or something.

† KMXD †
Report Abuse
GrandAwsome is not online. GrandAwsome
Joined: 12 Jul 2011
Total Posts: 326
29 Feb 2012 03:17 PM
or you could insert a zombie... it would be pretty much the same thing
Report Abuse
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
29 Feb 2012 03:38 PM
@KnightmareXD, I'd doubt that would happen... if it did work with Player, it would delete everything in the workspace except me, the player.
Report Abuse
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
29 Feb 2012 04:18 PM
Bump
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
29 Feb 2012 04:21 PM
No, it checks to see if it is not a player, and not you. If it meets those requirements, it will destroy the character.

† KMXD †
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
29 Feb 2012 04:22 PM
Sorry, if it IS a player*

† KMXD †
Report Abuse
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
29 Feb 2012 04:38 PM
Yush that's what I mean but it doesn't delete any other stuff in the workspace like a part or a script..
Report Abuse
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
01 Mar 2012 12:54 PM
Bump!
Report Abuse
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
01 Mar 2012 01:16 PM
Bumpty bump
Report Abuse
TTTroy is not online. TTTroy
Joined: 04 Aug 2011
Total Posts: 125
01 Mar 2012 05:38 PM
Bumpu!
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