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: best script evaaaaaaaarrrrr

Previous Thread :: Next Thread 
rocksrolling749 is not online. rocksrolling749
Joined: 11 Jul 2010
Total Posts: 20896
19 Jan 2013 09:02 AM
Script.function (Touch)

if
Humanoid (Touch) "part"
then
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
wait (1)
Humanoid.Damage = -5
end
end

im surprised if you read this far
Report Abuse
DannyCore is not online. DannyCore
Joined: 25 Apr 2012
Total Posts: 990
19 Jan 2013 09:04 AM
oh my

this is by far the best script ever

jolly good show!
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
19 Jan 2013 09:19 AM
im surprised if u failed this hard
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
19 Jan 2013 09:52 AM
script.Parent.Touched:connect(function(part)
if part.Parent:FindFirstChild("Humanoid") then
for num=1,10 do
part.Parent.Humanoid:TakeDamage(5)
wait(1)
end
end
end)


Was that really that hard?!
Report Abuse
rocksrolling749 is not online. rocksrolling749
Joined: 11 Jul 2010
Total Posts: 20896
19 Jan 2013 09:53 AM
I never took scripting lessons and I only learned by reading other scripts.
And yes it was pretty hard.

im surprised if you read this far
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
19 Jan 2013 09:59 AM
A few errors..

Script doesn't have "function" located anywhere inside of it
The if statment is pretty off
Your setting the humanoids health (If you were to actually call it) to -5, not make it go down 5.



~ Moo logic = logical logic ~
Report Abuse
rocksrolling749 is not online. rocksrolling749
Joined: 11 Jul 2010
Total Posts: 20896
19 Jan 2013 10:04 AM
Its supposed to be subtracted by 5

im surprised if you read this far
Report Abuse
awsumpwner27 is not online. awsumpwner27
Joined: 03 Sep 2011
Total Posts: 4389
19 Jan 2013 10:09 AM
Your script doesn't subtract 5, it just makes health equal to -5.

You gotta do this:

var = var - 5
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
19 Jan 2013 12:13 PM
Rescripted to handle when parent is nil (yes it happens)

script.Parent.Touched:connect(function(part)
if part.Parent then
local humanoid = part.Parent:FindFirstChild("Humanoid")
if humanoid then
for i = 1, 10 do
humanoid:TakeDamage(5)
wait(1)
end
end
end
end)
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
19 Jan 2013 12:31 PM
@seranok. Then you should check if humanoid is still okay within the loop.
Report Abuse
FoolHater is not online. FoolHater
Joined: 17 Jul 2008
Total Posts: 2141
19 Jan 2013 09:04 PM
"Script.function (Touch)"

MY EYES!!!!!!
Report Abuse
TeamDman is not online. TeamDman
Joined: 04 Dec 2009
Total Posts: 897
20 Jan 2013 07:24 AM
And the fact that he copypasta'd the lines setting health to -5 didn't burn your eyes with the simple solution of a for loop?
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