So I wanted to make a when a person enters a region the get put into first person. Can anyone please help me fix my script? Im quite new to LUA

local Part = script.Parent
local Camera = workspace.CurrentCamera
Camera.CameraType = Enum.CameraType.Scriptable
local function FirstPerson(part)
	local player = game.Players.LocalPlayer
	if player.Part.Touched then
		game.StarterPlayer.CameraMaxZoomDistance = 0.5
	if player.part.Touched = false then
		game.StarterPlayer.CameraMaxZoomDistance = 128
		end
	end
end

Part.Touched:Connect(FirstPerson)

2 comments

2

Player.CameraMode = Enum.CameraModee.LockFirstPerson

0

It didn't work