Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can't use CustomPhysicalProperties.Friction?

I want to make a ball disacellerate when touching a certain part. It happens that the "Friction" and "FrictionWeight" doesn't seem to work, as I applied it to both the ball and the ground it touches. EDIT: I am changing friction in CustomPhysicalProperties of the ball and ground, both enabled.

It came to a point where I scripted a disacelleration function that keeps cutting the ball speed by 5% when stepping on grass, and 30% when stepping on sand. But I do want the ball to stop on wedges, and I don't know how to make a complex physics code.

I want to know if this property isn't working or if I just mistook what friction is. If it works, can you guys tell me if I commited a error here?

4 comments

0

From the devpage: "Used to control the Friction of the part, but now it no longer does anything. The Friction of a part is now determined by either its Material or its CustomPhysicalProperties."

0

I did change friction on CustomPhysicalProperties

0

You can't do part.CustomPhysicalProperties.Friction = .... You need to reassign CustomPhysicalProperties. Make a new PhysicalProperties with the same properties as the existing one, but different friction, then assign it.

0

I am changing friction on CustomPhysicalProperties Manually, but it doesn't work. Elasticity seems to work, which shows that CustomPhysicalProperties changes are being applied (ball bounced a lot when I increased the ground's elasticity.

1 answer

It happens that friction is actually being changed, as I tested with 0 friction and changes were made, resulting in a slippery ground. The issue is the fact friction property is limited to a value of 2, which isn't enough for what I had in mind (a golf ball stopping on a small slope).

This discussion is preserved as it was. New answers, comments, and votes are closed.