Hello there. I will try not to make this post too long. Recently, I made this post asking how to make an efficient handcuff system. After some discussion and testing, I decided to use a CFrame system in which the cuffed player’s NetworkOwner is the player grabbing him and a local script inside the player grabbing sets the CFrame of the player being cuffed.
That works great, but there is one major problem. When looking at the player being cuffed from a third-person perspective (any player that isn’t the player grabbing), it looks like the player is bouncing around and glitching all over the place. Here is an example:
My question is, is there a way to eliminate this glitch? I really have no idea why it happens or how to eliminate it. I have tried CFraming the player a little higher than the ground in order it clipped with the ground, but that didn’t work. I really do want to keep the NetworkOwnership of the player cuffed to the player grabbing since it prevents laggy movement and looks smooth on the screen of the player that is grabbing, which is a necessity when making these systems. Here is the script:
-- Variables --
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local ArrestData = Character:WaitForChild("ArrestData")
local Grabbing = ArrestData:WaitForChild("Grabbing")
local GrabbingCharacter = Grabbing.Value.Character or Grabbing.Value.CharacterAdded:Wait()
local GrabbingHumanoidRootPart = GrabbingCharacter:WaitForChild("HumanoidRootPart")
local CanContinue = true
-- Scripting --
RunService.Heartbeat:connect(function(Beat)
if CanContinue == true then
if Grabbing.Value ~= nil then
GrabbingHumanoidRootPart.CFrame = HumanoidRootPart.CFrame * CFrame.new(0, 0, -2.5)
else
CanContinue = false
script:Destroy()
end
end
end)
If you could help me, that would be amazing. Thank you for your time and effort.