LynXS_

Untitled

Jun 25th, 2024
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1.  
  2. local RunService = game:GetService('RunService')
  3. local LocalPlayer = game:GetService('Players').LocalPlayer
  4. local Camera = workspace.CurrentCamera
  5. local Obscuring = {}
  6.  
  7. RunService.RenderStepped:connect(function()
  8. for _, v in pairs(Obscuring) do
  9. v.LocalTransparencyModifier = 0
  10. for _, v2 in pairs(v:GetChildren()) do
  11. if v2:IsA('Texture') then
  12. v2.Transparency /= 1000
  13. end
  14. end
  15. end
  16.  
  17. if not LocalPlayer.Character then return end
  18. Obscuring = Camera:GetPartsObscuringTarget({LocalPlayer.Character.HumanoidRootPart.CFrame.p}, LocalPlayer.Character:GetChildren())
  19.  
  20. for _, v in pairs(Obscuring) do
  21. v.LocalTransparencyModifier = 1
  22. for _, v2 in pairs(v:GetChildren()) do
  23. if v2:IsA('Texture') then
  24. v2.Transparency *= 1000
  25. end
  26. end
  27. end
  28. end)
Advertisement
Add Comment
Please, Sign In to add comment