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 doesn't remove when told to?

Previous Thread :: Next Thread 
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
22 Jan 2014 08:29 PM
I've been trying to make this work.. but apparently it just keeps looping and doesn't remove itself..
It's a local script.


while wait() do
wait(2)
local plr = game.Players.LocalPlayer
if plr:FindFirstChild("leaderstats").Stage.Value == 150 then
local tools = game.ToolStorage:getChildren()
for i=1,#tools do
local tool = tools[i]:Clone()
tool.Parent = plr.Backpack
script:remove()
end
end
end
Report Abuse
devLucas is not online. devLucas
Joined: 10 Dec 2013
Total Posts: 526
22 Jan 2014 08:30 PM
Try script:Destroy() instead.
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
22 Jan 2014 09:05 PM
It still won't be removed.
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
22 Jan 2014 09:15 PM
Bump..
Report Abuse
Rocketerkid is not online. Rocketerkid
Joined: 10 Oct 2011
Total Posts: 1237
22 Jan 2014 09:18 PM
Are you sure "ToolStorage" is even holding anything?
Report Abuse
domorox17 is not online. domorox17
Joined: 06 Mar 2012
Total Posts: 1710
22 Jan 2014 09:49 PM
Even if it is, it will delete after the first tool. Put the remover after the first end
Report Abuse
Vyxium is not online. Vyxium
Joined: 31 Aug 2010
Total Posts: 1020
22 Jan 2014 10:00 PM
maybe break the loop and then remove it
Report Abuse
ScriptNHelper is not online. ScriptNHelper
Joined: 15 Oct 2013
Total Posts: 1600
22 Jan 2014 10:01 PM
Destroy the script Destroy()
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
22 Jan 2014 11:13 PM
I got it to work, breaking the loop worked.
Report Abuse
eendo is not online. eendo
Joined: 26 Feb 2012
Total Posts: 1237
23 Jan 2014 03:00 AM
remove() is not supported anymore

use Destroy() instead

~Instance = no
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