How to make a glass knockback when destroying it?

I want to make it so if you break glass by your fist, or guns and others depending if it can break a glass, the glass will have knockback and it also depends on your lookvector. What I can do is to detect if a player destroys a glass by modifying the item that destroys glass by making an object value which, the value is a one who is the one damaging (Glass has humanoid) and parent the object value into the glass and make it detect it has been damaged and detect if an object value exists and the value exists. What I can think is using body forces but I don’t know how. (If there’s another way, how?). How can I achieve this?
https://gyazo.com/8f3cc3c43d81424334ef027260bd9188 (My problem)

https://gyazo.com/82b300926aae3dee0249c245bbb01a19 (Example, it uses body force)

Note: The glass shatter is made manually, not by a script.
12

1 Like

You will probably find this useful for what you want to do

If you’re asking how to do directional force for the glass breaking…

I normally create a BodyVelocity then set it’s Velocity to the lookvector between the two points:

BodyVelocity.Velocity = CFrame.new(bullet.Position,Glass.Position).LookVector * 25

And then multiple it by an amount.

Also destroy the BodyVelocity after like 0.1 seconds or so, just to get it moving, but not fly away.

1 Like