Ok, so i have wanted to create a car damage system for my car, currently using A-Chassis C 1.5 by Novena (idk where the original went but heres a link: https://create.roblox.com/marketplace/asset/6896819172/AChassis-6C-15) , i have basically taken the car damage free model (link here: https://create.roblox.com/marketplace/asset/8573744621/Car-damage-kit) and modified it. Currently i am working on how the part bends (im not using mesh deformation im just using scale cause mesh deformation can cause a bit of lag), however i have came across a few issues.
When i hit a wall the mesh will subtract it’s scale however it will keep its position relative to the car.
WHAT I NEED
i want to have the position changed where the bumper stays on the fender, if that makes any sense
i kinda want the scale to work like the scale tool
Currently i am using two modified versions of the script i got from the free model, this specific script is the one that bends the parts
if script.Parent.Velocity.Magnitude > hit.Velocity.Magnitude + 40 and hit.CanCollide == true or hit.Velocity.Magnitude > script.Parent.Velocity.Magnitude + 35 and hit.Name == "Wall" then local targetcpart = script.Parent.TargetPart.Value local CParts = targetcpart.Parent local currentcustomizedpart = script.Parent.CurrentPart.Value local damageamnt = math.abs(0.01)*-1 for _,v in pairs(currentcustomizedpart:GetChildren()) do v.Size -= Vector3.new(0, 0, (targetcpart.Health.Value*damageamnt+1) ) v.Position -= Vector3.new(0, 0, (targetcpart.Health.Value*1+1) ) end end end script.Parent.Touched:connect(crashed)
I have tried many ways to move the part, when i use vector3 it doesnt move at all and when i use cframe it just breaks the suspension of the car.
I really dont want to use the misc part of a-chassis however if that is the only way we can do it than we can.
I have basically looked everywhere for a solution however nothing has really helped me for this situation.
Help would be greatly appreciated, thx.