Help using CustomPhysicalProperties

I’m trying to make my part Ice through a script. However, I’m not sure how to change properties of “CustomPhysicalProperties” through a script.

local BP = game.Workspace.Baseplate

while true do
	BP.CustomPhysicalProperties.Friction = 0.004
	BP.CustomPhysicalProperties.FrictionWeight = 100

	BP.BrickColor = BrickColor.new("Pastel Blue")
	BP.Material = ("Ice")
	warn('Iced Baseplate')
	
	wait(10)
	
	BP.CustomPhysicalProperties.Friction = 0.3
	BP.CustomPhysicalProperties.FrictionWeight = 1

	BP.Material = ("Plastic")
	BP.BrickColor = BrickColor.new("Dark stone grey")
	warn('Reset BasePlate Ice')
	wait(5)
end

CustomPhysicalProperties expects a PhysicalProperties datatype as its value. I do not believe the properties of PhysicalProperties are directly mutable so you need to construct your own PhysicalProperties and set it to CustomPhysicalProperties if you want to override values like friction.

It comes up with this error:

PhysicalProperties is not a valid member of Part "Workspace.Baseplate"

Edit: Would you mind giving me a script example? I’m learning to script, so the post you sent me is a little confusing.

PhysicalProperties is a creatable datatype. CustomPhysicalProperties is the property of BaseParts that you write to. Please refer to CustomPhysicalProperties for a code sample, it’s at the bottom of the page.