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: Clear Lag Script, explain help?

Previous Thread :: Next Thread 
Alpal425 is not online. Alpal425
Joined: 29 Mar 2011
Total Posts: 214
30 Dec 2013 04:29 PM
Trying to make a clear lag script. I saw that usually with a clear lag script, it will say "Removing Debris in (amount of time)". And there is a folder called Debris, so does it remove everything that's like hats and stuff? And if so, I am trying to learn this little clear all children command. The wiki says (as an example to help understand):

model = game.Workspace.Model

in1 = Instance.new("Part", model)
in2 = Instance.new("Sparkles", model)

game.Workspace.Model:ClearAllChildren() --the part and sparkles in the model will be removed, but the model will remain

Still trying to learn scripting so don't judge please. :c

So, if I did..

DF = game.Debris

function ClearAll()

game.Debris:ClearAllChildren
wait(180)

end)

Would that work or not? If not please help because I am still new to functions too!!
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
30 Dec 2013 04:34 PM
The Debris service is something different. If you're new to scripting, avoid it for now. I think this is more what you are looking for:

model_to_clear = Workspace.Model

function ClearAllChildren(model)
model:ClearAllChildren()
end


ClearAllChildren(model_to_clear)
Report Abuse
Alpal425 is not online. Alpal425
Joined: 29 Mar 2011
Total Posts: 214
30 Dec 2013 04:37 PM
But they are hats and stuff. You know, like when someone takes off their hat.
Report Abuse
DrRandomous is not online. DrRandomous
Joined: 25 Mar 2011
Total Posts: 1702
30 Dec 2013 04:39 PM
k hold on

m=Instance.new("Message", game.Workspace)
while true do
wait(10)
for i = 1,5 do
m.Text = "Removing debris in: "..6-i
wait(1)
end
for i,v in pairs(game.Workspace:GetChildren()) do
if v:IsA("Hat") then
v:remove()
end
end
end
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
30 Dec 2013 04:40 PM
Dropped hats are not stored in Debris
Report Abuse
Alpal425 is not online. Alpal425
Joined: 29 Mar 2011
Total Posts: 214
30 Dec 2013 04:50 PM
But then the message gets stuck there and doesn't go away! D:
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