I’m a beginner scripter and I am attempting to create ballistics in roblox with shells and armor. I was just wondering what function I can use to get a part’s angle. This will be used in a sense that if a projectile hits an armor plate at a shallow angle (15° or less), the projectile will ricochet.
I know this is completely wrong but I did a short script for an example.
local hitAngle = *** if hitAngle < 15 then script.Parent.CanCollide = true
Now in the “***” area, I need to know what function I can use to get a part’s angle when it hits a brick.
this is avery good question,the answer is:
local hitAngle = script.Parent.Orientation.Magnitude if hitAngle >= 15 then script.Parent.CanCollide = true