Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a way to make parts take damage from players and break?

Asked by 6 years ago

For my game a player can activate a forcefield with will spawn using scripts. But I was curious to know if bricks can take damage from humanoids firing at them with guns, or humanoids using plane turrets to break down the forcefield??

0
If you put a humanoid inside a model and put the brick inside the brick can take damage, as long as you rename the brick to head Galicate 106 — 6y
0
So for instance I would put the Humanoid inside the model, which is in the brick. then when the humanoid dies the brick will break? When it spawns the brick has CanCollide true, so when the humanoid dies will CanCollide be false? or do I have to link them with a script? Yutube_SB101 5 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

You can insert a "Humanoid" in the brick and name that brick "Head".. I'm not sure if that works but if so do:

[Script in the brick] if script.Parent.Humanoid.Health <= 0 then --If the brick health is equal or lower than 0 then... script.Parent.CanCollide = false end You can use this to force fields.

Ad

Answer this question