How Do I Make My FOV Change When I'm Getting Chased?

,

Hi! So A lot Of My Recent Posts Are About My Upcoming Horror Game, Sadly This One Too. So I Made An AI Chase Script (one of my first) but I want the fov (field of view) to change when your getting chased by the Monster like in the mimic. But I don’t know how to do it tho. EXAMPLE: I WAS SO CLOSE! The Mimic Roblox - YouTube (this is not my video)

4 Likes

When you are being chased by ai, Simply fire an remote event and change the fov but you must get the player who has been chased so the other player will not get the chase effect.

3 Likes

It’s quite simple to do this;
You just need to check if the humanoid being chased is a player, and if it is, fire an event to the player, which’ll be Connected by a local script which will make it hange the FoV

4 Likes

Like the other replies suggested, all you have to do is check if a player is being followed and use a RemoteEvent which fires to the client to change their FOV.

local tweenService = game:GetService("TweenService")
local camera = workspace.CurrentCamera
local remote = --Path Here

local function changeFOV(amount)
    local tween = tweenService:Create(camera, TweenInfo.new(1, Enum.EasingStyle.Quint), {FieldOfView = camera.FieldOfView - amount})
    tween:Play()
end

remote.OnClientEvent:Connect(function()
    changeFOV()
end)
3 Likes

Do you have to place that in a dummy? Cus It might help me.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.