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: does anyone know why the SFotH regen only works once?

Previous Thread :: Next Thread 
supasonic7 is not online. supasonic7
Joined: 09 Jan 2008
Total Posts: 968
31 Dec 2015 02:30 AM
does anyone have any idea why the script below only works once?
it's the almost universal regen script for weapons on SFotH places
you can pick it up, and it will respawn, but when it needs to respawn again after that it won't.

---SCRIPT BELOW---

bin = script.Parent

ItemName = "Windforce" -- The name of the item in the stand.
WaitTime = 5 -- The amount of time to wait before regenerating the item.


Item = bin:findFirstChild(ItemName)
backup = Item:clone()

function regen()
local regen = backup:clone()
regen.Parent = bin
end

debounce = false
function onTaken(property)
if (debounce == true) then return end
debounce = true
if (bin:findFirstChild(ItemName) == nil) then
wait(WaitTime)
regen()
print("regenWind")
end
debounce = false
end


Item.Changed:connect(onTaken)
Report Abuse
supasonic7 is not online. supasonic7
Joined: 09 Jan 2008
Total Posts: 968
31 Dec 2015 07:51 AM
b1
Report Abuse
supasonic7 is not online. supasonic7
Joined: 09 Jan 2008
Total Posts: 968
31 Dec 2015 02:15 PM
b2
Report Abuse
supasonic7 is not online. supasonic7
Joined: 09 Jan 2008
Total Posts: 968
31 Dec 2015 04:30 PM
b3
Report Abuse
supasonic7 is not online. supasonic7
Joined: 09 Jan 2008
Total Posts: 968
01 Jan 2016 12:34 AM
b4
Report Abuse
UnstableScript0 is not online. UnstableScript0
Joined: 21 Dec 2015
Total Posts: 1189
01 Jan 2016 12:37 AM
local Item = script.Parent:FindFirstChild'WindForce'
local Clone = Item:Clone()

Item.Changed:connect(function()
if not script.Parent:FindFirstChild(Item.Name) then
wait(5)
Clone:Clone().Parent = script.Parent
end
end)
Report Abuse
supasonic7 is not online. supasonic7
Joined: 09 Jan 2008
Total Posts: 968
01 Jan 2016 04:53 AM
just like the other script, it respawns, but it only does it once. are there other factors affecting it?
Report Abuse
BFFstick00 is not online. BFFstick00
Joined: 25 Oct 2010
Total Posts: 800
01 Jan 2016 06:27 AM
http://wiki.roblox.com/index.php?title=Intro_to_Scripting
Report Abuse
supasonic7 is not online. supasonic7
Joined: 09 Jan 2008
Total Posts: 968
01 Jan 2016 10:27 AM
"http://wiki.roblox.com/index.php?title=Intro_to_Scripting"


i choose to ignore idiots like you and thus, b5
Report Abuse
UnstableScript0 is not online. UnstableScript0
Joined: 21 Dec 2015
Total Posts: 1189
01 Jan 2016 10:46 AM
local Item = script.Parent:FindFirstChild'WindForce'
local Clone = Item:Clone()

function Check(Item2)
if not script.Parent:FindFirstChild(Item2.Name) then
wait(5)
local Weapon = Clone:Clone()
Weapon.Parent = script.Parent
Weapon.Changed:connect(function()
Check(Weapon)
end)
end
end

Item.Changed:connect(function()
Check(Item)
end)

When I looked up "Ninjas" in Thesaurus.com, it said "Ninja's can't be found" Well played Ninjas, well played.
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