You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
make pov but only until the pov number is ending number (its a function)
What is the issue? Include screenshots / videos if possible!
pov just keeps going
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i tried altering the numbers but I’m confused unless my math just is bad idk
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local function FOVmovement(start, ending, Speed) --Start is number pov starts at, ending is where it should stop after zooming in, speed isnt really important here
Camera.FieldOfView = start
repeat
wait(Speed)
Camera.FieldOfView = Camera.FieldOfView - 0.25
until Camera.FieldOfView == ending
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
You should use TweenService instead to smoothly tween the FieldOfView. Here’s an example on how that would look
local TweenService = game:GetService("TweenService")
local function FOVmovement(Ending, Time)
TweenService:Create(Camera, TweenInfo.new(Time), {FieldOfView = Ending}):Play()
end
Using tweens is better than manually looping and editing the property. Any number can be tweened, Position, CFrame, Color3, Transparency, anything that’s a number. You just replace the Camera in the tween with the object you want to tween, and set FieldOfView to the property you want to tween.
Also, use task.wait() instead of wait(), wait() will soon be deprecated as task.wait() is better in every way.
You could set the FOV in the FOVmovement function, or tween it so its smooth. You could also just use the FOVmovement function twice, so something like