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

Rotate player to be face down?

Asked by 8 years ago

So I've been stuck on this seemingly simple problem.I'm trying to make it so when a player's health hits 1,a death animation is played.But,I can't seem to be able to figure out how to rotate the player to fall on its face.Here is the code for the localscript:

01while game.Players.LocalPlayer.Character==nil do
02wait(0.1)
03end
04local debounce=false
05local Character=game.Players.LocalPlayer.Character
06local Humanoid=Character.Humanoid
07 
08Humanoid.HealthChanged:connect(function(Health)
09if Health==1 and debounce==false then
10debounce=true
11Humanoid.PlatformStand=true
12--CFrame.
13wait(0.2)
14Character.Torso.CFrame=CFrame.new(Character.Torso.Position)*CFrame.Angles(math.rad(-90),Character.Torso.Rotation.Y,Character.Torso.Rotation.Z)
15Character.Torso.Anchored=true
View all 33 lines...

How would I make it so the player literally rotates forward on to its face?I spend 3 hours googling this and trying to figure it out,yet I can't seem to be able to find a solution...

0
I've tried every possibly CFrame.Help? Reshiram110 147 — 8y

Answer this question