How come I cannot set Friction in my script?

Hey I’m making a script where I turn blocks to ice and I was wondering how come I cannot set the friction Value inside a script. I have workarounds but I would rather do this inside the script so if anybody can help I’d really appreciate it.

for i, part in pairs(IceParts:GetChildren()) do 
			if part:IsA("BasePart") then 
				part.CustomPhysicalProperties.Friction = 0 
				part.CustomPhysicalProperties.FrictionWeight = 25 
				part.Color = Color3.new(108, 211, 255)
				part.Material = Enum.Material["Ice"]
				part.Transparency = 0.15
				part.Reflectance = 1
			end
		end

image
all help would be much appreciated.

Looks like you need to set it as a physical property to the CustomPhysicalProperties
part.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,25)

See the documentation below, the first three parameters listed would be for Density, Friction, Elasticity, respectively. The fourth parameter would give you access to the FrictionWeight.

1 Like

oooo that makes sense I really appreciate you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.