Im trying to make a monster that follows the player, i already got it moving but i dont know how to rotate i already have tried using CFrame.LookAt but doesnt work is there any other method to do it?..
--LOCAL SCRIPT
local plr = game:GetService("Players").LocalPlayer
local LookingPart = workspace.bigtallguy.Torso
local rs = game:GetService("RunService")
while wait() do
if plr.Character ~= nil then
wait(0.1)
--local LookAtCF = CFrame.lookAt(LookingPart.Position, plr.Character.PrimaryPart.Position)
script.RemoteEvent:FireServer(Vector3.new(plr.Character.PrimaryPart.Position))
end
end
--SERVER SCRIPT
script.Parent.OnServerEvent:Connect(function(plr,Vector)
print("recieved and done")
workspace.bigtallguy.Torso.Attachment.LinearVelocity.VectorVelocity = Vector3.new(-200,0,0)
workspace.bigtallguy.Head.CFrame = CFrame.lookAt(workspace.bigtallguy.Head.Position,Vector)
end)
local model = --goofy model goes here
--make sure the model or character has a primary part
local lookVector = (plr.Character.HumanoidRootPart.Position - model:GetModelCFrame().Position).Unit
model:SetPrimaryPartCFrame(CFrame.lookAt(model:GetModelCFrame().Position, model:GetModelCFrame().Position + lookVector))