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 » Scripters
Home Search
 

Re: Clean Tools / Hats script

Previous Thread :: Next Thread 
RobloxAdminSystim is not online. RobloxAdminSystim
Joined: 16 Jun 2016
Total Posts: 102
25 Jul 2016 07:06 PM
I need a script for this, I've searched in developer tab and none of them work. Help please, I don't mind if you make one or find a working one


Report Abuse
Dominical is not online. Dominical
Joined: 04 Nov 2011
Total Posts: 1303
25 Jul 2016 07:08 PM
Add this script to workspace or ServerScriptService:

-- Let me know if there's any errors or problems, and I'll investigate the script again.
while wait(.5) do
for i,v in pairs(workspace:GetChildren()) do
if v:IsA("Hat") or v:IsA("Tool") then
v:Destroy()
end
end
end



Report Abuse
RobloxAdminSystim is not online. RobloxAdminSystim
Joined: 16 Jun 2016
Total Posts: 102
25 Jul 2016 07:10 PM
It works perfectly, but I forgot to be specific my bad! can you make it where when someone says " clean " the script takes action


Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
25 Jul 2016 07:11 PM
player.Chatted:connect(function(m)

if m:lower() == "clean" then
--code
end

end)
Report Abuse
Dominical is not online. Dominical
Joined: 04 Nov 2011
Total Posts: 1303
25 Jul 2016 07:21 PM
Just in case you didn't know what to do with the thedailyblarg posted, replace what I gave you earlier with this:

player.Chatted:connect(function(m)

if m:lower() == "clean" then

for i,v in pairs(workspace:GetChildren()) do
if v:IsA("Hat") or v:IsA("Tool") then
v:Destroy()

end
end
end

end)


Report Abuse
RobloxAdminSystim is not online. RobloxAdminSystim
Joined: 16 Jun 2016
Total Posts: 102
25 Jul 2016 07:27 PM
Didn't work :(


Report Abuse
Dominical is not online. Dominical
Joined: 04 Nov 2011
Total Posts: 1303
25 Jul 2016 07:28 PM
Oops, try this:

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(m)

if m:lower() == "clean" then

for i,v in pairs(workspace:GetChildren()) do
if v:IsA("Hat") or v:IsA("Tool") then
v:Destroy()

end
end
end

end)
end)


Report Abuse
RobloxAdminSystim is not online. RobloxAdminSystim
Joined: 16 Jun 2016
Total Posts: 102
25 Jul 2016 07:31 PM
tysm both of you!


Report Abuse
RobloxAdminSystim is not online. RobloxAdminSystim
Joined: 16 Jun 2016
Total Posts: 102
25 Jul 2016 07:31 PM
worked like a charm (;


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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