-
What do you want to achieve? I want to make it not lag behind
-
What is the issue? The subject is lagging behind https://www.youtube.com/watch?v=fM5ObUDzd4o
I asked how I would fix this over at the Scripting Helpers Discord and someone told me that I should set the officer’s network owner to the client and have the client do it on renderstep.
What would be the best way to do the server-client communication?
I’m currently using Heartbeat on the server as you can see below
Handcuffs Grab Method
function Handcuffs:Grab(Subject)
if not Subject:IsA("Player") then return end
self.Officer = self._EquipTrack.Player.Value
self.Subject = Subject
--TODO: Disable Backpack and Unequip currently equipped tool of Subject
FastSpawn(function()
HumanoidUtil.ForceUnseatHumanoid(Subject.Character.Humanoid)
CharacterUtil.GetPlayerRootPart(self.Subject).Anchored = true
self.Grabbing = true
--Heartbeat--
self._Heartbeat = RunService.Heartbeat:Connect(function()
CharacterUtil.GetPlayerRootPart(self.Subject).CFrame = CharacterUtil.GetPlayerRootPart(self.Officer).CFrame * CFrame.new(Vector3.new(2.5,0,-5))
end)
end)
end