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

How can I move an anchored player?

Asked by 5 years ago

When I try to move a player using this method, the player sometimes has the falling motion or flinging motion while frozen.

And yes the characters has to be anchored

player.Character.HumanoidRootPart.Anchored  = false
player.Character.HumanoidRootPart.CFrame = CFrame.new(yard.Position,game.Workspace.CamPart.Position)
wait()
player.Character.HumanoidRootPart.Anchored  = true
0
You could make all limbs anchored, but other than that, there's possibly a no other way. User#22219 20 — 5y

2 answers

Log in to vote
2
Answered by 5 years ago

No matter what you do, you will always get the same result after trying another type of method. I remade your code,

local Player = game.Players.LocalPlayer
local Character = Player.CharacterAdded:Wait() or Player.Character

function AnchorTeleport(HRP, Position)
    HRP.Anchored = false

    if not HRP.Anchored then
    wait()
    HRP.Anchored =true
    HRP.CFrame = Position
    end
end

AnchorTeleport(Character.HumanoidRootPart, CFrame.new(game.Workspace.CamPart.Position))

then realised it was futile because I always got the same result as you. Just don't use anchored, or stop the animation from playing in the 'Animate' localscript ROBLOX gives you by either waiting for it clone to the character and stopping it, or make a custom animation script of your own.

0
Your script worked for me thank you so much! ICosmicReaver 32 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

The best way to do this is to anchor ALL parts of the player and then change the CFrame of the HumanoidRootPart.

0
This should be a comment. User#19524 175 — 5y

Answer this question