Help with Tire Wear

Hello! I have made a tire wear script but it is not working! I have everything in the right spots but I dont know what the problem is. Thanks for the help!

	if script.Parent.Parent.VehicleSeat.Steer ~= 0 then
		script.Parent.Friction = script.Parent.Friction - 0.03
	end
	wait(18)
end```

Friction is apart of PhysicalProperties. You cannot set to friction alone.

What you’d wanna do is:

   if script.Parent.Parent.VehicleSeat.Steer ~= 0 then
      local newF = script.Parent.CustomPhysicalProperties.Friction - .03
      local phys = PhysicalProperties.new(script.Parent.CustomPhysicalProperties.Density, newF, script.Parent.CustomPhysicalProperties.Elasticity)
      script.Parent.CustomPhysicalProperties = phys
   end
   wait(18)
end

There are 3 different versions of setting physical Properties. You can set it with a Material Enum, with only Friction/Density/Elasticity like I’ve done above, or with all 5 settings (the 3 before + FrictionWeight & ElasticityWeight)

That being said, in the grand scheme of tire wear, I’m not so sure this is the best idea. Best of luck with it though, maybe it’s good for your use case.

3 Likes