I believe what I’m asking is relatively simply but I have no idea how to do it. Basically, when I’m far enough away from a part, I want it to disappear. That would be pretty easy, the hard part is I want this part to become more transparent the further I get from it, until it finally disappears.
if (character.Head.Position - part.Position).Magnitude >= 10 then
--gradually reduce transparency until you get to 20, where it would then be fully transparent.
end
Any help is appreciated! If clarification is needed I’ll be glad to provide.
This does work, but I also need a minimum distance to where the transparency won’t be changed, in other words it’ll only start to fade when you get far enough. Sorry if I didn’t convey that very well in my post!
local MinDistanceCutoff = 10
local MaxDistanceCutoff = 20
local Distance = (character.Head.Position - part.Position).Magnitude
local Transparency = math.clamp((Distance-MinDistanceCutoff)/(MaxDistanceCutoff-MinDistanceCutoff), 0, 1)
This should probably work
Edit:
Thanks lol, I’m not in studio and testing rn just typing it in my browser.