Still have questions? Join our Discord server and get real time help.
Log in to vote

Rotating player CFrame by self moves whole player?

Asked by
xEiffel 268 Moderation Voter
9 months ago
Edited 9 months ago

Hi I've been trying to experiment with this issue, but I can't figure it out. Basically what I have is a system where it gets the player from the table [IntroSequence] by the number it's up to in the loop. Then it teleports the player to an intro sequence and then i want the players body to be turned a specific way (facing the camera) - but unfortunately it's not working. Right now what i'm using, whatever direction the player is facing before hand, it will stack onto that.

    local thatPlayer = workspace.GameQualities.inCutscene:FindFirstChild(IntroSequence[increase])
    if not thatPlayer then
        return false
    thatPlayer:MoveTo(workspace.Intro.Points:FindFirstChild(increase).Position -,2,0))
    thatPlayer:SetPrimaryPartCFrame(thatPlayer.HumanoidRootPart.CFrame * CFrame.Angles(math.rad(0),math.rad(20),math.rad(0)))

and if I use this method for the PrimaryPartCFrame part;

thatPlayer.HumanoidRootPart.CFrame * 

The player teleports to the 0,0,0 point in the world space. Any help would be appreciated. Thanks.

If you set the primary part to HumanoidRootPart then the rotation should work fine, I'm not really sure why it defaults to head Vulkarin 556 — 9mo
Isn't that MoveTo line useless? gets overwritten? cabbler 1869 — 9mo
Oh Okay. and @cabbler probably is. xEiffel 268 — 9mo
Oh Okay. and @cabbler probably is. xEiffel 268 — 9mo

Answer this question