Ok so i figured out why my script was creating a huge delay but i dont really know how i can fix it. Sooo the problem is that im for looping a remotefunction (from what im guessing). It creates a really big delay after a few moments. For example walking on client looks fine but on server looks delayed.
LocalScript:
local function getobjects() return game:GetDescendants() end for i,v in next, getobjects() do wait() v.Changed:Connect(function(p) game:GetService("ReplicatedStorage").Prop:InvokeServer(v, tostring(p), v[p]) end) end
ServerScript:
local PropRemote = game:GetService("ReplicatedStorage"):FindFirstChild("Prop") or false PropRemote.OnServerInvoke = function(plr, part, prop, value) part[prop] = value end
Is there anyway to run these codes without using a RemoteEvent/RemoteFunction?