I’m trying to create a puzzle where the player has to look away from the part in order to walk through it, I currently have a script that works fine but doesn’t work when the player goes into first person, the player is still able to walk through the part while looking at it in first person.
I can’t disable first person because the player has to go into first person to turn around.
local camera = workspace.CurrentCamera
game:GetService("RunService").RenderStepped:Connect(function()
local screenPos, onScreen = camera:WorldToScreenPoint(part.Position)
if not onScreen then
part.CanCollide = false
else
part.CanCollide = true
end
end)
(script was made by a friend i take no credit <3)