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: Not removing tool

Previous Thread :: Next Thread 
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
29 Jan 2012 01:37 PM
The goal is for the parent to be removed from the player's backpack. They player has a Boolvalue declaring if they are admin or not too. Any help?

p = script.Parent.Parent.Parent
while true do
wait(1)
if (p:findFirstChild("Admin")) then
wait(1)
if (p.Admin.Value == false) then script.Parent:remove() else break end
end
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
29 Jan 2012 01:41 PM
while wait() do
if script.Parent.Parent:FindFirstChild("Admin") and script.Parent.Parent.Parent.Value == false then script.Parent:Destroy() -- remove()
else
break
end
end
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
29 Jan 2012 01:42 PM
Use the .Changed event instead. A loop will lagg like crazy.
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
29 Jan 2012 01:42 PM
True, but he may not know how to use the .Changed event...
Report Abuse
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
29 Jan 2012 01:44 PM
What would the .Changed event do. I have never heard of it before. >.<
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
29 Jan 2012 01:47 PM
Well, it would do something if the Property of an object changes.
Report Abuse
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
29 Jan 2012 01:53 PM
Oh, ok, but where would it be implemented?
Report Abuse
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
29 Jan 2012 01:58 PM
Still not working :C
Report Abuse
LuisPambid is not online. LuisPambid
Joined: 31 Mar 2011
Total Posts: 532
29 Jan 2012 02:04 PM
While cuase lags, I prefer you need to use the Changed event ^^
Report Abuse
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
29 Jan 2012 02:06 PM
Bump
Report Abuse
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
29 Jan 2012 02:07 PM
Sorry about the bump. I don't get where the changed event would go?
Report Abuse
Phellem is not online. Phellem
Joined: 04 Aug 2011
Total Posts: 1984
29 Jan 2012 02:09 PM
while true do
wait(0.3)
if script.Parent.Parent:FindFirstChild("Admin") and script.Parent.Parent:FindFirstChild("Admin").Value == false then script.Parent:Destroy()
end
end


-- Tell me the location of the script, where the BoolValue: Admin is, what you want to be deleted
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