GESTROW
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 346 |
|
|
| 30 Dec 2012 11:05 PM |
Can someone give me a script that I can add to this (http://www.roblox.com/Teh-N00b-item?id=102105076) to make it delete itself after it has been idle for a certain time without players near it? Sort of like the idle skateboard remover in the skateboard gear tools. |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 30 Dec 2012 11:16 PM |
nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
~ Secrets Shall Lead Us To The End ~ |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 30 Dec 2012 11:17 PM |
Why should someone do this for you?
~ Secrets Shall Lead Us To The End ~ |
|
|
| Report Abuse |
|
|
GESTROW
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 346 |
|
|
| 31 Dec 2012 12:37 AM |
| because it would be nice of them, isn't this the correct forum? Where people help others selflessly, like most others already did. I try to help too btw. |
|
|
| Report Abuse |
|
|
GESTROW
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 346 |
|
|
| 31 Dec 2012 12:41 AM |
I'm using what I gain here to benefit the public anyway, I'm making this
http://www.roblox.com/Robot-Sword-Fight-place?id=102098763
Can someone please help me make this game better and help me with the scripts? |
|
|
| Report Abuse |
|
|
| |
|
GESTROW
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 346 |
|
|
| 31 Dec 2012 01:04 AM |
| Come on really? You don't have to reply "no," its implied when you don't respond. |
|
|
| Report Abuse |
|
|
| |
|
GESTROW
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 346 |
|
| |
|
|
| 31 Dec 2012 01:43 AM |
| DEAL c: but you will owe me 30 >.> |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 02:44 AM |
| I would but I cant script :( But, I am learning how to! You can join too! Lua Scripting school |
|
|
| Report Abuse |
|
|
Tomarty
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 591 |
|
|
| 31 Dec 2012 07:47 AM |
I'm just going to write a basic outline with lots of errors because i'm on a tablet with autocorrect on Part = script.Parent Seconds=60 Num=1 While true do Wait(1) Num=Num+1 If num >Seconds then part:remove() end --its been 60 seconds and nobody has been near it For I,p in ipairs(game.Players:children()) do If p ~= nil then Char = p.Character If char:findFirstChild("Head")~=nil then If (char.Head.Position-Part.Position).Magnitude<15 then--15 is the distance people need to be to reset the timer Num=1 end end end end |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 07:59 AM |
Lol'd @above
Nice auto-correct you got there.
'For I, p in ipairs(game.Players:children()) do' |
|
|
| Report Abuse |
|
|
| |
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 31 Dec 2012 09:47 AM |
| You insulted us, and still want our help? Get out now. |
|
|
| Report Abuse |
|
|
GESTROW
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 346 |
|
|
| 04 Jan 2013 05:20 PM |
| I did not insult your "us," as which you speak of, but if you felt insulted, I apologize. |
|
|
| Report Abuse |
|
|
GESTROW
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 346 |
|
|
| 04 Jan 2013 05:26 PM |
@Tomarty I would use this anyway if you didn't say that it had errors, lol I can't script yet so I won't be able to correct those errors made by autocorrect. Can someone fix this script for me?
Part = script.Parent Seconds=60 Num=1 While true do Wait(1) Num=Num+1 If num >Seconds then part:remove() end --its been 60 seconds and nobody has been near it For I,p in ipairs(game.Players:children()) do If p ~= nil then Char = p.Character If char:findFirstChild("Head")~=nil then If (char.Head.Position-Part.Position).Magnitude<15 then--15 is the distance people need to be to reset the timer Num=1 end end end end
|
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
| |
|
GESTROW
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 346 |
|
| |
|
GESTROW
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 346 |
|
|
| 04 Jan 2013 06:38 PM |
| I just realized that autocorrect would change i'm to I'm, juu lies! |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2014 02:09 AM |
I know this is old but, Thanks Tomarty! I have learned enough about scripting to find all the errors in that and it works! For anyone trying to learn to script like I am, see if you can find all the changes.
Part = script.Parent Seconds=60 Num=1 while true do wait(1) Num=Num+1 if Num >Seconds then Part:remove() end --its been 60 seconds and nobody has been near it for i,v in ipairs(game.Players:children()) do if v ~= nil then char = v.Character if char:findFirstChild("Head")~=nil then if (char.Head.Position-Part.Position).Magnitude<15 then--15 is the distance people need to be to reset the timer Num=1 end end end end end
And there you have it. The corrected Part removing script. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 09 Oct 2014 02:15 AM |
game.Players:children() Is that even a thing? |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 09 Oct 2014 02:23 AM |
'game.Players:children() Is that even a thing?'
:children() is a depreciated version of :GetChildren() |
|
|
| Report Abuse |
|
|
|
| 10 Oct 2014 04:14 AM |
| Awesome, so the script works on basic parts but, not much else. I altered the script a bit more to include the GetChildren instead of children and now comes the big problem. I'm trying to use this on a hatgiver so that I don't have 1000's of hats all over my game. The hatgiver gets removed but not the clones. ugh. Any ideas on how to get it to remove the clones but not the giver? |
|
|
| Report Abuse |
|
|