Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does customphysicalproperties not work?

Asked by
WishXVI 94
3 years ago

I'm using the command bar in roblox studio to change the customphysicalproperties of multiple parts at once with the same name. Why does this not work?

density = 10
friction = 0
elasticity = 0
frictionWeight = 0
elasticityWeight = 0

physProperties = PhysicalProperties.new(density, friction, elasticity, frictionWeight, elasticityWeight)


 for i, v in pairs(workspace:GetChildren()) do
    if v.Name == "Tie" then 
    v.CustomPhysicalProperties = physProperties end
end


Answer this question