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: HELP! Can somebody make me a simple script?

Previous Thread :: Next Thread 
GESTROW is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
AndrewIsAnnoyed is not online. AndrewIsAnnoyed
Joined: 11 Feb 2011
Total Posts: 3994
31 Dec 2012 12:53 AM
no
Report Abuse
GESTROW is not online. 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
MainDirectory is not online. MainDirectory
Joined: 20 Dec 2012
Total Posts: 1834
31 Dec 2012 01:35 AM
For 100 robux .-.
Report Abuse
GESTROW is not online. GESTROW
Joined: 04 Dec 2009
Total Posts: 346
31 Dec 2012 01:40 AM
i got 70
Report Abuse
MainDirectory is not online. MainDirectory
Joined: 20 Dec 2012
Total Posts: 1834
31 Dec 2012 01:43 AM
DEAL c: but you will owe me 30 >.>
Report Abuse
JackerManthenoob is not online. JackerManthenoob
Joined: 08 Feb 2012
Total Posts: 963
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 is not online. 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
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
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
JackerManthenoob is not online. JackerManthenoob
Joined: 08 Feb 2012
Total Posts: 963
31 Dec 2012 09:12 AM
xD I see that 2
Report Abuse
doneyes is not online. 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 is not online. 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 is not online. 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 is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
04 Jan 2013 05:28 PM
@jack, advertising much?
Report Abuse
GESTROW is not online. GESTROW
Joined: 04 Dec 2009
Total Posts: 346
04 Jan 2013 05:48 PM
bump
Report Abuse
GESTROW is not online. 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
CptJHarkness is not online. CptJHarkness
Joined: 19 Sep 2014
Total Posts: 6
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 is not online. 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 is not online. 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
CptJHarkness is not online. CptJHarkness
Joined: 19 Sep 2014
Total Posts: 6
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
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