View previous topic :: View next topic |
Author |
Message |
hk1777 Beginner Poster
Joined: 26 Mar 2008 Posts: 13
|
Posted: Wed Mar 26, 2008 9:05 pm Post subject: part braking script |
|
|
Name: brake
Description: it brakes parts of your car/plane/whatever
Needed Objects: i think a intvalue and something like if script.Parent.brake = 0 then script.Parent:brakejoints()
Place Description: for my virus is spreading to make it like the zombies have damaged the cars thx for any help _________________ i like the color orange and cats and what did the apple say to the banana |
|
Back to top |
|
|
Aeacus Site Admin
Joined: 05 Feb 2008 Posts: 299 Location: Canada
|
Posted: Wed Mar 26, 2008 9:16 pm Post subject: |
|
|
One way to do this, is using :BreakJoints()
Inside your model, you could try creating a script that is something along these lines;
h = script.Parent:findFirstChild("Humanoid")
function onChanged()
if h~= nil then
if h.Health < 10 then
script.Parent:BreakJoints()
end
end
end
h.Changed:connect(onChanged)
I haven't tested it, but if your model has a humanoid, that should work _________________ If you say "Plz" because it is shorter than "Please," I will say "No" beacuse it is shorter than "Yes."
|
|
Back to top |
|
|
hk1777 Beginner Poster
Joined: 26 Mar 2008 Posts: 13
|
Posted: Wed Mar 26, 2008 10:17 pm Post subject: |
|
|
ok ill try it _________________ i like the color orange and cats and what did the apple say to the banana |
|
Back to top |
|
|
hk1777 Beginner Poster
Joined: 26 Mar 2008 Posts: 13
|
Posted: Thu Mar 27, 2008 12:22 am Post subject: |
|
|
doesnt work my zombies infect you not kill _________________ i like the color orange and cats and what did the apple say to the banana |
|
Back to top |
|
|
Aeacus Site Admin
Joined: 05 Feb 2008 Posts: 299 Location: Canada
|
Posted: Thu Mar 27, 2008 12:24 am Post subject: |
|
|
In that case, simply edit the if statement to look for a different property. _________________ If you say "Plz" because it is shorter than "Please," I will say "No" beacuse it is shorter than "Yes."
|
|
Back to top |
|
|
|