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: Death script ( Help )

Previous Thread :: Next Thread 
Fatalizer is not online. Fatalizer
Joined: 28 Aug 2011
Total Posts: 1520
17 Sep 2014 03:03 PM
Hello,

I have my script that when a player is dead all the parts will be Anchored and the parts will fade away, this is my script;


print'//[: Fatalizer SmoothScript Loaded:]\\'


local Humanoid = game.Players.LocalPlayer.Character.Humanoid

Humanoid.Died:connect(function()
for i,v in pairs (Humanoid.Parent:GetChildren()) do
if v:IsA("Part") then


v.Anchored = true

wait(.1)

for i = 0,1,0.1 do

v.Transparency = i
wait(0.1)

end
end
end
end)

This won't work, anyone know a fix ?



~ I don't rekt kids, I eat them ~
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
17 Sep 2014 03:05 PM
It's because you defined i twice...
Make it so you edit one of the i to a different variable.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Sep 2014 03:06 PM
This is inside of a localscript?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Sep 2014 03:07 PM
And yes. Set the iteration in ipairs to _ or something, since you're not using it.
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