I’m working on a script that checks when the character is on a distance to make something invisible, here is the script: (Sorry for the format)
game:GetService("RunService").RenderStepped:Connect(function()
local Stuff = game:GetService("Workspace"):GetDescendants()
for _, Object in pairs(Stuff) do
if Object:IsA("Part") then
local _LowDetail = Object:FindFirstChild("_LowDetail")
if _LowDetail then
if _LowDetail.Value then
local Character = Player.Character
if Character then
local PrimaryPart = Character.PrimaryPart
if PrimaryPart then
local Distance = (PrimaryPart.Position - Object.Position).Magnitude
if Distance >= Object:FindFirstChild("_LowDetailDistance").MaxValue then
Object.Transparency = 1
elseif Distance <= Object:FindFirstChild("_LowDetailDistance").MaxValue then
Object.Transparency = 0.75
elseif Distance <= Object:FindFirstChild("_LowDetailDistance").MinValue then
Object.Transparency = 1
end
end
end
end
end
end
end
end)
You might have seen that it checks if the character is on 3 different distances, one if the character is in a distance where the part would be invisible, the other would be if the character is in a distance where the part is semi-visible, and the other would be if the character is in a distance where the part is visible, and now, the problem is that the part that checks if the character is in a distance where the part is VISIBLE is not working, that means, when i’m in the distance of <15 studs far to the part My grammar is bad and i know it B) , it’s not visible completely, it’s still semi-visible, and i don’t know what i could to to fix it. I hope you help me, thanks for reading.