I have been trying to make a part look at the player using a local script. HELP!
You can use set the orientation of the part to a CFrame.Angles() and you can set it to the player’s head orientation.
1 Like
How would I make that script work?
Here is a script example
local Part = workspace.Part
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Head : BasePart = Character:WaitForChild("Head")
while task.wait() do
Part.Orientation = Head.Orientation
end
Use CFrame.lookat to set the part’s cframe to look toward the player
Part.CFrame = CFrame.lookAt(Part.Position, Character:GetPivot().Position)
Use the CFrame.lookAt
constructor.
5 Likes
I dont know how to implement that
Part = --whatever the main part of you model is
Character = --Define the character you want to look at
Part.CFrame = CFrame.lookAt(Part.Position, Character:GetPivot().Position)
in a script