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: Custom Health

Previous Thread :: Next Thread 
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
21 Mar 2015 10:16 AM
What is the best way to go about making a custom health script(in detail please), I thought it may be to add a value to the players character and then say if it = to 0 they are dead and if hit by a raycast, the ray will use FindFirstChild("HealthValue") and then take 10 from it,, how would i start this?
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
21 Mar 2015 10:18 AM
Well what I would do is use a .Touched function in every part of the character and make a NumberValue named "Health" then I would put a BillBoardGUi on top of the players head and update the size depending on the health.
That's how I would do it but you need to figure out the scripts.
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
21 Mar 2015 10:22 AM
So maybe like f


local children = game.Player.LocalPlayer
foreach child in children do
if child == "Part" then
child.Touched:connect(function()
--SOMETHING LIKE THAT?
end
end
end
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
21 Mar 2015 10:23 AM
Yeah but you need to attach a BillBoardGui into the players head and you need a lot more scripts
Report Abuse
drazen12345 is not online. drazen12345
Joined: 30 Oct 2013
Total Posts: 1005
21 Mar 2015 10:24 AM
A child/Children is the smaller parts of a parent,


What the hell is that?
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
21 Mar 2015 10:25 AM
Ok, but should ahve mentioned in my game you dont have a player, there character is replaced with a union(a ship)..... How am i going to make this work. I insert the value and say if the part is touched then its value shuld decrease.
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
21 Mar 2015 10:29 AM
?
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
21 Mar 2015 10:34 AM
b
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 Mar 2015 10:36 AM
Why would you need to get when the player is touched? You described what you needed to do perfectly, so just do it.
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
21 Mar 2015 10:39 AM
Oh,did i? but aanyway i am stuuuggling because i want so when the health (numbervalue) gets to 0 it will display a gui on the players screen but i cant do that because tyo access the value you n eed a script but i want to use local scripts so i can access the local player, how do i do this?
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 Mar 2015 10:45 AM
Use a localscript that accesses the value?
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
21 Mar 2015 10:46 AM
I can't seem to get that workign tho, it jsut never finds it
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
21 Mar 2015 10:46 AM
local script--


Value.Changed:connect(function()
if Value.Value <= 0 then
--Show gui
end
end
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
21 Mar 2015 11:15 AM
You need to insert the billboardgui in the union. Uncopylock the place and I will fix it
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
21 Mar 2015 11:18 AM
Yeah, nice try i already fixed it, yo aint stealing mah game
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
21 Mar 2015 12:11 PM
I dont steal games. Its absolutely fine! I understand your concern.VEry nice job fixing it and good luck with your game!
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