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: Can someone fix this Script?

Previous Thread :: Next Thread 
ShieldOfStone is not online. ShieldOfStone
Joined: 22 Jul 2014
Total Posts: 42
20 Jul 2015 12:32 PM
function()
if script.Parent.Health = 0
then
Juff = Instance.new("Part")
Juff.Colour = "Red"
end
end

--Made by ShieldOfStone
Report Abuse
Clxver is not online. Clxver
Joined: 19 Oct 2014
Total Posts: 727
20 Jul 2015 12:32 PM
function juff()
if script.Parent.Health == 0 then
local juff = Instance.new("Part", game.Workspace)
juff.BrickColor = BrickColor.new("Bright red")
end
end

juff()
Report Abuse
ShieldOfStone is not online. ShieldOfStone
Joined: 22 Jul 2014
Total Posts: 42
20 Jul 2015 12:33 PM
Thx
Report Abuse
Clxver is not online. Clxver
Joined: 19 Oct 2014
Total Posts: 727
20 Jul 2015 12:33 PM
Oh wait, I think you should rename the local variable inside of the function. I don't know if that would affect the function itself because it's the same name as the function. Sorry.
Report Abuse
ShieldOfStone is not online. ShieldOfStone
Joined: 22 Jul 2014
Total Posts: 42
20 Jul 2015 12:36 PM
Kk
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
20 Jul 2015 12:39 PM
I don't think it'll matter since it'll overwrite the global variable (the function)
Report Abuse
KAAK82 is not online. KAAK82
Joined: 06 May 2014
Total Posts: 1166
21 Jul 2015 07:11 AM
function test()
if script.Parent.Health == 0 then
juff = Instance.new('Part', workspace)
juff.BrickColor = BrickColor.new('Red')
end
end
Report Abuse
fret13103 is not online. fret13103
Joined: 15 Mar 2010
Total Posts: 881
21 Jul 2015 07:26 PM
local humanoid = script.Parent:findFirstChild("Humanoid")

humanoid.HealthChanged:connect(function(health)
Blood()
end)


function Blood()
if humanoid.Health == 0 then
local Blood = Instance.new("Part", Workspace)
Blood.Color, Blood.Size = "Red", Vector3.new(1,1,1)
end
end

--ready to copy+paste, script goes inside character of player.
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