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

How do I make a part face what the Player's facing?

Asked by 3 years ago

I need help on this! I'm making a FNAF rp game and that when you hover the mask button it will fire an event and place a mask on the player, it works fine but, the mask faces one direction, I want it to face where the Player's head is facing!

local mask = game.ServerStorage.FNAFMask:Clone()
mask.CFrame = player.Character.Head.CFrame * CFrame.new(0,0.50,0)
mask.Orientation = player.Character.Head.CFrame.lookVector
mask.Parent = player.Character.Head

1 answer

Log in to vote
0
Answered by 3 years ago

Here this should work,

local mask = game.ServerStorage.FNAFMask:Clone()
mask.CFrame = player.Character.Head.CFrame + player.Character.Head.CFrame.LookVector
mask.Parent = player.Character.Head
0
After modifying your script for a bit, it works just fine! VitGamer123br 32 — 3y
0
Thanks, glad i could help VerdommeMan 1479 — 3y
Ad

Answer this question