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: My script. IS IT OK OR NOT?

Previous Thread :: Next Thread 
zorgan9220 is not online. zorgan9220
Joined: 25 Sep 2011
Total Posts: 2115
12 Dec 2011 02:30 AM
Tell if its ok or not:

function onTouched(hit)

repeat
Script = script.Parent.Parent.Script
Lightning = TimeOfDay.new (01:06:01)
wait(2)
Lightning = TimeOfDay.new (12:03:06)
end
script.Parent.Lightning:Connect(onTouched)
Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
12 Dec 2011 03:26 AM
No, it is not.

First of all, you always repeat **until** something. :P
repeat
--[[ what you are repeating ]]
until false --Condition. false would make it loop forever.

Second of all, this absolutely NEEDS a debounce, or else the script will stack and, not only will it make your game laggy, but it will not give the desired effects.

http://wiki.roblox.com/index.php/Debounce
Report Abuse
zorgan9220 is not online. zorgan9220
Joined: 25 Sep 2011
Total Posts: 2115
12 Dec 2011 04:22 AM
*Palmface* I am getting tired of fixing scripts by myself. Just, gimme the corrected version because I am not appericiated of what you have posted.
Report Abuse
LCPLgeek is not online. LCPLgeek
Joined: 28 Dec 2009
Total Posts: 2770
12 Dec 2011 04:30 AM
*snickers

No, were not going to fix scripts for you.

Give a man a fish for dinner, and he will be content for a night. Teach a man how to fish, and he will be content for life.
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
12 Dec 2011 07:16 AM
Plus it is "lighting" not "lightning".
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
12 Dec 2011 07:16 AM
Never mind, that was a variable haha. I just woke up, give me slack.
Report Abuse
link7002 is not online. link7002
Joined: 26 May 2009
Total Posts: 545
12 Dec 2011 07:49 AM
THAT WAS AWESOME! JUst gimme the script. You're funny. While I am a scriptr, and I could edit it, it's the mere fact that us scripters are lazy bums who don't do work, unless it benefits ourselves. ESPECIALLY the ones who think theyre all that. ( like above )
Report Abuse
Trapper4O77 is not online. Trapper4O77
Joined: 03 Aug 2011
Total Posts: 5648
12 Dec 2011 12:50 PM
local IsOn = false
function onTouched(hit)
local user = hit.Parent:findFirstChild("Humanoid")
if user then
if IsOn == false then
IsOn = true
repeat
Script = script.Parent.Parent.Script
Lightning = TimeOfDay.new (01:06:01)
wait(2)
Lightning = TimeOfDay.new (12:03:06)
end end
until false
IsOn = false
script.Parent.Lightning:Connect(onTouched)

~Never ignore a coincidence. Unless you're busy, in which case always ignore a coincidence~
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
12 Dec 2011 12:56 PM
@LCPLgeek

Give a man a match, and he's warm for a minute.
Light a man on fire, and he's warm for life.

"I WILL GIVE YOU BACON." - Deadmau5
~Scarfacial
Report Abuse
Trapper4O77 is not online. Trapper4O77
Joined: 03 Aug 2011
Total Posts: 5648
12 Dec 2011 01:07 PM
lol, scar. I have to remember that...
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
12 Dec 2011 01:48 PM
@SCARFACIAL
SO TRUE.
Report Abuse
LCPLgeek is not online. LCPLgeek
Joined: 28 Dec 2009
Total Posts: 2770
12 Dec 2011 03:06 PM
@scar,
They'd be warm for about 30 seconds, but by then, they'd throw themselves into a lake or a snow bank.
Report Abuse
zorgan9220 is not online. zorgan9220
Joined: 25 Sep 2011
Total Posts: 2115
13 Dec 2011 12:39 AM
@Tra


You just answered my question!
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