I really wanna make an npc or block move when the user isin’t looking but when the user is looking at it i want it to not move at all, to be honest i just really need the method and that’s all, i don’t even know where to uh start, tried a lot of stuff and got a lot of help that didn’t work, so if anyone please?
i’m talking about like in the horror games where you look at the ghost it doesn’t move but then it does when you don’t look at it.
Here is an example of usage of this function of the Camera:
game:GetService('RunService').Stepped:Connect(function()
local Position, PlayerCanSee = Camera:WorldToScreenPoint(part.Position)
if PlayerCanSee then
-- Do something with our model.
end
end)