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

Can't change other players CFrame ?

Asked by 6 years ago
Edited 6 years ago

Whenever i try to change someones CFrame by using a script (i was using studio 2 player feature) it teleports the player to that CFrame then it teleports back immediately but for my char it works fine? No errors either.

for example i was using this

    for i,v in pairs (game.Players:GetPlayers()) do
            v.Character.Torso.CFrame = v.Character.part.CFrame
0
change the v.Character.Torso Into "v.Character.HumanoidRootPart" WindowMall 54 — 6y
0
Still does the same thing and TPs back. ATestAccount420 31 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

You should change torso to HumanoidRootPart unless you're working with r6

for index, player in pairs(game.Players:GetPlayers()) do
    v.Character.HumanoidRootPart.CFrame = v.Character.part.CFrame
end

Remember you should not teleport them like this because it can break their char because you can get stuck into each other, so add * CFrame.new(0,index*5,0) or something like that.

0
They aren't teleporting to the same spot and the part they're teleporting to is cancollide = false Also that doesn't fix my problem sadly, i am using r6 and i tried humanoidrootpart.CFrame and Torso.CFrame both seem to fling back to the original spot. ATestAccount420 31 — 6y
Ad

Answer this question