Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a player that welds to player2 control player2's movements?

Asked by 5 years ago
Edited 5 years ago

I tried switching out who was part0 and 1, and it didn't work very well. The player that is welded to is always able to control the movement.

User = script.Parent.Parent.Parent
hurt = true
function touch(hit)
     if hurt == true  then
    humanoid = hit.Parent:FindFirstChild("Humanoid")
 player = game.Players:GetPlayerFromCharacter(hit.Parent)

local torso = player.Character:FindFirstChild("UpperTorso")
            local weld = Instance.new("Weld")
            weld.Name = "BackWeld"
            weld.Part0 = User.HumanoidRootPart
            weld.Part1 = torso
            weld.C0 = CFrame.new(0,2,-2)
            weld.Parent = torso
end
   hurt = false
end



script.Parent.Touched:connect(touch)

Answer this question