Log in to vote

Rotating player CFrame by self moves whole player?

Asked by
xEiffel 233 Moderation Voter
3 months ago
Edited 3 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 342 — 3mo
Isn't that MoveTo line useless? gets overwritten? cabbler 1880 — 3mo
Oh Okay. and @cabbler probably is. xEiffel 233 — 3mo
Oh Okay. and @cabbler probably is. xEiffel 233 — 3mo

Answer this question