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 look in the player's direction?

Asked by 3 years ago

I have trying to make a working mask for my FNAF Roleplay

If you hover a imagelabel it will fire a server event for equipping/unequipping the mask, it works fine but, the mask doesn't follow the lookVector of what's supposed to be the player's head lookVector.

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
0
What does it follow then? Any errors? Does it move at all? I_Nev 200 — 3y
0
what are you trying to do with the multiplying cframe User#30567 0 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

can you try putting this in line 2 and removing line 3?

mask.CFrame = CFrame.new(mask.Position, player.Character.Head.Position*Vector3.new(1,0,1) + mask.Position * Vector3.new(0,1,0))

im not sure if it will look up or down but im sure it will look at the player

0
Didn't work VitGamer123br 32 — 3y
Ad

Answer this question