Log in to vote

How to make the player constantly face a part?

Asked by 17 days ago

I am trying to make a focus system. The thing I am trying to do is when shift is pressed the Local Player constantly faces an NPC (Enemy) Head while making the camera also to look at the Enemy.

Events.LockToEnemy.OnServerInvoke = function(player , pressed)
        local Camera = workspace.CurrentCamera

        local Goal = workspace.Enemies:FindFirstChild(chainedEnemyGlobal).Head

        while true do
        Camera.CFrame =,Camera.CFrame.Position)

this is the thing I tried but it is not working for some reason . The chainedEnemyGlobal variable is for the nearest player script I am using which dosen't seem to be the problem. Pls I have been searching for an answer for 3 days now and I could find anywhere for help

It might be a new bug with roblox, I am having almost the exact issue: epoke466 100 — 17d

Answer this question