So, I have created cuffs before. I tried to re-make it, and there is now an issue where when I cuff the person, they are inside of me instead of where the cuffs are supposed to be.
This is in a ServerScript inside of the tool:
--// Variables \\--
local uCP = script.Parent.UncuffPlayer
local cP = script.Parent.CuffPlayer
local jP = script.Parent.JailPlayer
--// Cuff Function \\--
cP.OnServerEvent:Connect(function(player,torso)
local char = player.Character or player.CharacterAdded:Wait()
if char then
local charTorso = char:FindFirstChild("HumanoidRootPart")
if charTorso then
local cuffingVal = script.Parent.Cuffing
cuffingVal.Value = true
local cuffWeld = Instance.new("Weld")
cuffWeld.Name = "CuffWeld"
cuffWeld.Part0 = charTorso
cuffWeld.Part1 = torso
cuffWeld.Parent = torso
torso.CFrame = charTorso.CFrame + Vector3.new(0,0,5)
end
end
end)
--// Uncuff Function \\--
uCP.OnServerEvent:Connect(function(player,torso)
local weld = torso:FindFirstChild("CuffWeld")
weld:Destroy()
local cuffingVal = script.Parent.Cuffing
cuffingVal.Value = false
torso.Parent.Humanoid.JumpPower = 50
torso.Parent.Humanoid.WalkSpeed = 16
end)
This is in a LocalScript inside of the tool:
--// Variables \\--
local cuffs = script.Parent
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
--// Equip Function \\--
cuffs.Equipped:Connect(function()
mouse.Button1Down:Connect(function()
if mouse.Target.Parent:FindFirstChild("Humanoid") then
local char = mouse.Target.Parent
if char then
local torso = char:FindFirstChild("HumanoidRootPart")
if torso then
local cuffingVal = script.Parent.Cuffing
if cuffingVal.Value == true then
local uCP = script.Parent.UncuffPlayer
uCP:FireServer(torso)
else
local cP = script.Parent.CuffPlayer
cP:FireServer(torso)
end
end
end
end
end)
end)
This is what my cuff looks like in the explorer:

2 comments
Didn't work. https://gyazo.com/90b6e0804f6240147c7bb5fbb9f3e528 - This still happens.
There