Ad
Log in to vote
0

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
    end
    thatPlayer:MoveTo(workspace.Intro.Points:FindFirstChild(increase).Position - Vector3.new(0,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.

0
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
0
Isn't that MoveTo line useless? gets overwritten? cabbler 1880 — 3mo
0
Oh Okay. and @cabbler probably is. xEiffel 233 — 3mo
0
Oh Okay. and @cabbler probably is. xEiffel 233 — 3mo

Answer this question