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: Script Helping : Frostbolt Script Damage Script

Previous Thread :: Next Thread 
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
28 Sep 2014 03:33 PM
I have a script and it's not turning their limbs blue like it's supposed to.
Here it is. I can't find out what the problem is.
Probably just me being a dumb scripter lol.
-------------------------------------------------------------


function onDamage(Part)
if Part.Parent:findFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= "script.Parent.name" then
for i=1,10 do
wait(0.05)
Part.Parent.Humanoid.Health = Part.Parent.Humanoid.Health -1
Part.Parent.Humanoid.WalkSpeed = 12
j = Part.Parent:findFirstChild("Right Leg")
if j then j.BrickColor=BrickColor.new("Light blue")

end

x = Part.Parent:findFirstChild("Left Leg")
if x then x.BrickColor=BrickColor.new("Light blue")

end

m = Part.Parent:findFirstChild("Right Leg")
if m then m.BrickColor=BrickColor.new("Light blue")

end

l = Part.Parent:findFirstChild("Right Leg")
if l then l.BrickColor=BrickColor.new("Light blue")

end


wait(1.5)
Part.Parent.Humanoid.WalkSpeed = 16
wait(0.05)
end
script.Parent:remove()
end
wait(0.025)
end

script.Parent.Touched:connect(onDamage)
Report Abuse
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
28 Sep 2014 03:40 PM
bump
Report Abuse
derocket33 is not online. derocket33
Joined: 28 Jul 2012
Total Posts: 238
28 Sep 2014 04:42 PM
bump
Report Abuse
NotTheTacos is not online. NotTheTacos
Joined: 01 May 2013
Total Posts: 41
28 Sep 2014 08:25 PM
bump
Report Abuse
EPICJAKEISCOOL is not online. EPICJAKEISCOOL
Joined: 07 Feb 2013
Total Posts: 1756
28 Sep 2014 08:38 PM
Just do this instead:

for I,v in pairs(part.Parent:GetChildren()) do
if v.ClassName == "Part" then
v.BrickColor = BrickColor.new("Light blue")
end
end
Report Abuse
EPICJAKEISCOOL is not online. EPICJAKEISCOOL
Joined: 07 Feb 2013
Total Posts: 1756
28 Sep 2014 08:39 PM
for I,v in pairs(Part.Parent:GetChildren()) do
if v.ClassName == "Part" then
v.BrickColor = BrickColor.new("Light blue")
end
end

*
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