So this is a problem that i encountered a few weeks ago and cannot find any fix to it. Whenever i try this specific for loop, theres a huge delay in server. For example, whenever i walk on client, its really really delayed on server and it looks like im lagging on other player's screen.
Heres the script:
LocalScript:
local function getobjects() return game:GetDescendants() end for i,v in next, getobjects() do v.Changed:Connect(function(p) game:GetService("ReplicatedStorage").Prop:FireServer(v, tostring(p), v[p]) end) end
Remote Script:
local PropRemote = game:GetService("ReplicatedStorage"):FindFirstChild("Prop", true) or false PropRemote.OnServerEvent:Connect(function(plr, part, prop, value) wait() part[prop] = value end)
If you know how to fix this problem, please let me know. Ive been trying for 3 weeks now and i cant find any way to fix it.