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

How to I find the friction of a part and print("Test") the part when the friction is greater than 1?

Asked by 4 years ago

Hello! I am wanting to know how I can detect the friction of a part and then enable a particle emitter once the friction is either higher or lower than a said value. All answers appreciated, thanks!

0
scripters here help you with your script, unless you have an example of an attempt you have made yourself, they probably will not answer you rower86 35 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Try this out:

local part = workspace:FindFirstChildWhichIsA("BasePart", true)
local particle = workspace:FindFirstChildWhichIsA("ParticleEmitter", true)

if part.PhysicalProperties.Friction >= 1 and particle then
    particle.Enabled = true
else
    particle.Enabled = false
end
Ad

Answer this question