Dynamic Bush Transparency

Greetings,

I want to create a bush which locally detects the magnitude of a player and dynamically changes it’s transparency depending on how close it is to the player, but I can’t quite wrap my head on how to create this.
Thanks for any help provided,

R3M1X

local mag = (humanoidRootPart.Position - brush.Position).Magnitude
local max = 20 --max magnitude
local transparency = mag / max
1 Like

Thanks, I’ll use this in game!
Another thanks,

R3M1X

1 Like