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: Kill brick?

Previous Thread :: Next Thread 
TacticalEnemy is not online. TacticalEnemy
Joined: 30 Nov 2011
Total Posts: 4714
18 Jun 2016 05:29 AM
So I need a script that is inside a brick and it gives the brick health.
When the brick has been damaged then it losses health, Then when it has no health it explodes and gets removed, but after a specific time it comes back.

Anyone here willing to help a guy in trouble? :=)
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
18 Jun 2016 05:52 AM
u either got money

or u r trying to learn and forgot to post ur script

i will do it for 20 robux
Report Abuse
8BitRetroGamer is not online. 8BitRetroGamer
Joined: 09 Mar 2013
Total Posts: 3546
18 Jun 2016 05:54 AM
Check the wiki, there's bound to be a script on this
Report Abuse
Leceptor is online. Leceptor
Joined: 31 Dec 2014
Total Posts: 15979
18 Jun 2016 06:02 AM
hmmmmm i donr script lol


Report Abuse
TacticalEnemy is not online. TacticalEnemy
Joined: 30 Nov 2011
Total Posts: 4714
18 Jun 2016 06:12 AM
@amanda I sent you a message
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
18 Jun 2016 06:14 AM
Put a Humanoid in the brick so that you can easily detect damage done to it. This would probably be the simplest solution for you to implement, but there are many other ways you could do this. :)
Report Abuse
TacticalEnemy is not online. TacticalEnemy
Joined: 30 Nov 2011
Total Posts: 4714
18 Jun 2016 06:15 AM
@Soybeen
Then the brick will only lose health (depending on which weapon Im using) and not dissapear
Report Abuse
TacticalEnemy is not online. TacticalEnemy
Joined: 30 Nov 2011
Total Posts: 4714
18 Jun 2016 06:22 AM
I just tested, the brick doesn't even lose health with humanoid :/
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
18 Jun 2016 06:25 AM
Well dude, it depends on what you're damaging it with/how xD
That's an equally important part to this process
Report Abuse
TacticalEnemy is not online. TacticalEnemy
Joined: 30 Nov 2011
Total Posts: 4714
18 Jun 2016 06:44 AM
So you know that exploding barrel free model?
So I took those scripts and added it to the wall, and now its working as I want it ;)
Report Abuse
TacticalEnemy is not online. TacticalEnemy
Joined: 30 Nov 2011
Total Posts: 4714
18 Jun 2016 09:10 AM
Ok so I have the wall, the explosion and the health.
But I have no regen script
Anyone help?
Report Abuse
8BitRetroGamer is not online. 8BitRetroGamer
Joined: 09 Mar 2013
Total Posts: 3546
19 Jun 2016 01:42 PM
http://wiki.roblox.com/index.php?title=How_to_Make_a_Model_Regenerate
Report Abuse
Leceptor is online. Leceptor
Joined: 31 Dec 2014
Total Posts: 15979
19 Jun 2016 02:12 PM
ya


Report Abuse
calvin56 is not online. calvin56
Joined: 18 May 2007
Total Posts: 784
19 Jun 2016 02:38 PM
this inside the brick:

local h = Instance.new("Humanoid",script.Parent)

function TakeDamage()
if h.Health <1 then
Instance.new("Explosion",script.Parent)
script.Parent.Transparency = 1
script.Parent.CanCollide = false
wait(10) --how long until the brick appears again
script.Parent.Transparenct = 0
script.Parent.CanCollide = true
end

i never tested it so tell me about any errors
Report Abuse
HalfPinky456 is not online. HalfPinky456
Joined: 10 Apr 2011
Total Posts: 6236
19 Jun 2016 03:06 PM
Calvin, you spelled transparency wrong
Report Abuse
elitekiller2342 is not online. elitekiller2342
Joined: 22 Dec 2014
Total Posts: 27
19 Jun 2016 04:41 PM
--make 2 scripts and a number value, name the number value HealthBrick and name the brick Enemy

--put this inside 1 of the scripts

local dad = script.Parent
local health = dad.HealthBrick.Value
while true do
if health==0 then
dad:remove() --< you can replace this with an explosion
end
end

--and this in the other script

function onTouch(hit)
if hit.Name=="Enemy" then
hit.HealthBrick.Value = hit.HealthBrick.Value -1
end
end
script.Parent.Touched:connect(onTouch)

--I haven't tried it so try this for yourself and see if you like it
Report Abuse
elitekiller2342 is not online. elitekiller2342
Joined: 22 Dec 2014
Total Posts: 27
19 Jun 2016 04:44 PM
#calvin56

the problem with the script you had was that the part would have to be anchored. Instead of making it disappear/transparency-change just make the Parent of the part "Lighting"
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