So I am trying to make a script for a handcuff tool, I don't know much about CFrames but I managed to do this:
[Remote Event]
local offset = CFrame.new(0,0,-2.2)
local char1 = selectedPlr.Character --(The character of the "cuffed" player)
local char2 = plr.Character -- (The character of the player with cuffs)
char1.HumanoidRootPart.CFrame = char2.HumanoidRootPart.CFrame:ToWorldSpace(offset)
This does what I want, and places the "cuffed" player in front of the one with the tool. Image
Now the problem is.. how do I make the cuffed player move as if it was welded to the other?
WeldConstraint didn't work as expected so what should I use?

17 comments
Maybe you could make this a localscript and make a GetMouse from the plr?
The script I published was a part of the function that fires with the remote event, the remote event is fired by a local script inside of the tool. This function will be fired for multiple players, so should I use a table instead of the "cuffed" variable, and check if the player is in it?
Yeah, I guess that would make more sense. I just thought in the moment a variable would be easier
Thank you, it works, the only problem is that sometimes this happens: https://gyazo.com/f9478a3dc9fa246fd59c0d5e00426007
If you don't know how to fix this I will still accept your answer, however this is kind of annoying
Add this to the script to make the player non - collidable:
for i,v in pairs(char1:GetDescendants()) do if v:IsA("Part") then v.CanCollide = false end end
If you don't understand, this basically goes through everything in the character and makes all parts collidable false.
I could also make it formatted and edit my answer
I tried this but the character's CanCollide doesn't change! I don't know why, there are no errors. If I try to manually change the CanCollide value of the torso or head server-side this happens https://gyazo.com/2ebaa82793fe2aa0fa7b5152585be96e
do you have anything making it collidable...?
No, the detain script is literally the only script in the game
not sure then. Maybe in the model there is another script??
I really don't know, there's nothing enabling it. I'm gonna try to find a solution, this might be a problem with my game, thank you for your help!
Any time! :)
I found this article https://developer.roblox.com/en-us/articles/Player-Player-Collisions . Apparently to make a players not collide with other players you need to create a collision group, but that's for all players, and I have no idea how to make only 1 player not able to collide with others. I will probably post a new question for this tomorrow
oh ok