How can i fix the issue(read title)
Heres an example script of what i mean.
--Example
local function getProp(obj, prop)
local getPropVar = obj[prop]
return getPropVar
end
local protectedCall = pcall
while wait() do
for i,v in next, game:GetDescendants() do
local Transparency = protectedCall(function() getProp(v, "Tranparency") end)
if Transparency then
Tranparency = 1
end
end
end
Running this lags you.
Is there any way to reduce the lag or get rid of the lag?
Any help is appreciated.

1 comment
Hey, just an fyi. Im pretty sure you dont even have to put a value into the wait() you can just leave it as "wait()" and it shouldnt lag. I might be wrong though.