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

How to allow a player to move another player?

Asked by 6 years ago

I'm trying to make a tool which enables a player to move another player around. It sounds simple in theory - when Player1 clicks Player2 with the tool, they "hold" Player2 - Player2 moves with them.

However, this isn't working.

I've tried using an old system of constantly setting Player2's Torso position infront of Player1, but with FilteringEnabled there's a weird delay no matter how I do this that makes this a very poor design indeed. I've also tried welding the two players together, however this only works half the time - the other half of the time, the player being held has control.

This is a snippet of the broken 50-50 script I have so far:

if not TargetTorso:FindFirstChild("arrestWeld") then
    local arrestWeld = Instance.new("Weld")
    arrestWeld.Name = "arrestWeld"
    arrestWeld.Parent = TargetTorso
    arrestWeld.Part0 = PlayerTorso
    arrestWeld.Part1 = TargetTorso
    arrestWeld.C1 = arrestWeld.C1 * CFrame.new(-1.257,0, 3.245) --Positions the player in the correct position for an animation
    TargetTorso.Parent.Humanoid.WalkSpeed = 0
end 

Any ideas on how to accomplish this?

0
use MoveTo() greatneil80 2647 — 6y
0
Ew no. Use SetPrimaryPartCFrame() User#19524 175 — 6y
0
It would help a lot if you post the full code. User#19524 175 — 6y

Answer this question