Cuff Response Time

Hello! First post, so when I click on a player, using the cuff, my movements seem to get a little delayed, making things really hard to control.

Also one last thing, is there a to make it so the cuffs go into your inventory every time you respawn? Right now I am only getting the cuffs when I first join, so if I die I lose the cuffs.

Feel free to ask me anymore questions!

Video I followed: https://www.youtube.com/watch?v=DtbcgJr0uww

Here is my arrest mechanics script:
local ReplicatedStorage = game:GetService(“ReplicatedStorage”).ArrestSystem

local ArrestUser = ReplicatedStorage:WaitForChild(“ArrestUser”)
local ReleaseUser = ReplicatedStorage:WaitForChild(“ReleaseUser”)
local AntiReset = ReplicatedStorage:WaitForChild(“AntiReset”)

local function AntiResetF(PlayerInstance, Status)
AntiReset:FireClient(PlayerInstance, Status)
end

local function ReleaseUserF(Player)
local P2 = Player.Character.HumanoidRootPart.CuffWeld.Part1
local P2Instance = game.Players:FindFirstChild(P2.Parent.Name)

Player.Character.HumanoidRootPart.CuffWeld:Destroy()

for i,v in ipairs(P2.Parent:GetDescendants()) do 
	if v:IsA("MeshPart") then
		v.Massless = false
	end
end
P2.Parent.Humanoid.WalkSpeed = 16
P2.Parent.Humanoid.JumpPower = 50

P2.Parent.Humanoid.PlatformStand = false

AntiResetF(P2Instance, true)

end

ArrestUser.OnServerEvent:Connect(function(Player, Victim)
local PlayerInstance = game.Players:FindFirstChild(Victim.Parent.Name)
local P1 = Player.Character.HumanoidRootPart
local P2 = Victim

local offset = Vector3.new(0,0.015,-5)
Victim.CFrame = P1.CFrame*CFrame.new(offset)

local NewConstraint = Instance.new("WeldConstraint")
NewConstraint.Parent = P1

NewConstraint.Part0 = P1
NewConstraint.Part1 = P2
NewConstraint.Name = "CuffWeld"

P2.Parent.Humanoid.PlatformStand = true

Victim.Parent.Humanoid.WalkSpeed = 0
Victim.Parent.Humanoid.JumpPower = 0 	

for i,v in ipairs(Victim.Parent:GetDescendants()) do 
	if v:IsA("MeshPart") then
		v.Massless = true
	end
end

AntiResetF(PlayerInstance, false)
print("Arrest")

end)

ReleaseUser.OnServerEvent:Connect(function(Player)
ReleaseUserF(Player)
end)

Here is my CuffGiver script:
local GroupId = 32595449
local MinRank = 22
local GroupId2 = 32638597
local MinRank2 = 1

game.Players.PlayerAdded:Connect(function(Player)
if Player:GetRankInGroup(GroupId) >= MinRank
or Player:GetRankInGroup(GroupId2) >= MinRank2 then
wait(5)
local Cloned_Tool = game.ReplicatedStorage.ArrestSystem.Model.Cuffs:Clone()
Cloned_Tool.Parent = Player.Backpack
end
end)

Can you send a video in of this happening?

Yes, let me get that real quick.

Hmm after restarting the server it seems to have fixed itself?

Is there still a way to get the cuffs to spawn on you after you die?

I will let you know if it appears again.

Also I found out how to fix the resetting issue,

game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(char) – this gives on respawn
if Player:GetRankInGroup(GroupId) >= MinRank
or Player:GetRankInGroup(GroupId2) >= MinRank2 then
wait(3)
if not Player.Backpack:FindFirstChild(“Cuffs”) then – Added so you don’t get 2 on startup
local Cloned_Tool = game.ReplicatedStorage.ArrestSystem.Model.Cuffs:Clone()
Cloned_Tool.Parent = Player.Backpack
end
end
end)
end)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.