So I’m currently trying to make it so that when parts of my collapsible buildings fall down, it kills the player. How can I do that? EXAMPLE script strongly suggested.
EDIT : NO ONCOLLIDERENTER!!! ONLY MASSIVE WEIGHT AND STRONG FALLING RIGID BODIES.
EDIT 2 : IM SORRY I MEANT I DIDNT WANT
TO DAMAGE PLAYER WHEN ONCOLLIDERENTER. Sorry.
EDIT 3 : When I said EXAMPLE script I meant something to start me, not a full script. People hate people for that now??? T.T
you can do a little tweaking on the second code, and get exactly what you’re looking for. instead of having the code instantiate a prefab, have the code ask
and that should only cause damage if the mass is over 50(you can change it to whatever number you want. (you could also make it do damage based on how massive the object is)
Does that help?