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

how can you turn on CustomPhysicalProperties using a script?

Asked by 4 years ago
Edited 4 years ago

I want to edit the CustomPhysicalProperties of the character when the player joins, but I need to enable it first, and I can't find the way to without using a custom character. Edit: sorry i meant i wanted to print the density


script.Parent.CustomPhysicalProperties = true script.Parent.CustomPhysicalProperties.Enabled = true script.Parent.CustomPhysicalProperties.Disabled = false script.Parent.CustomPhysicalProperties.Value = true

1 answer

Log in to vote
1
Answered by 4 years ago

You must provide a PhysicalProperties type value as seen in the wiki page:


local part = script.Parent -- The properties to set -- This will make the part light and bouncy! local density = .3 local friction = .1 local elasticity = 1 local frictionWeight = 1 local elasticityWeight = 1 -- Construct new PhysicalProperties and set local physProperties = PhysicalProperties.new(density, friction, elasticity, frictionWeight, elasticityWeight) part.CustomPhysicalProperties = physProperties
0
Huh that's odd, i tried to print the density but it wouldn't let me. Is there anyway I can do that? Noonekirby 162 — 4y
0
Edit:sorry I meant i wanted to get the density, my bad Noonekirby 162 — 4y
0
and now it works, odd. Thanks anyways! Noonekirby 162 — 4y
Ad

Answer this question