From 37390273e67c7ed9a003adb132b6c10a6c429a9f Mon Sep 17 00:00:00 2001 From: Tyunge Date: Wed, 17 Apr 2024 08:08:06 -0400 Subject: [PATCH] Check Valid phys first --- lua/entities/acf_gearbox_update/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/entities/acf_gearbox_update/init.lua b/lua/entities/acf_gearbox_update/init.lua index 23ce7a4d0..e8f720f3f 100644 --- a/lua/entities/acf_gearbox_update/init.lua +++ b/lua/entities/acf_gearbox_update/init.lua @@ -857,7 +857,7 @@ do -- Braking ------------------------------------------ if not self.Braking then return end -- Kills the whole thing if its not supposed to be running if not next(self.Wheels) then return end -- No brakes for the non-wheel users if self.LastBrake == Clock.CurTime then return end -- Don't run this twice in a tick - + if not IsValid(Contraption.GetAncestor(self):GetPhysicsObject()) then return end local BoxPhys = Contraption.GetAncestor(self):GetPhysicsObject() local SelfWorld = BoxPhys:LocalToWorldVector(BoxPhys:GetAngleVelocity()) local DeltaTime = Clock.DeltaTime