I am trying to make it so that you enter a value in to a text box and then click a button and it sets the Field Of View to that number. references: v = value of text box f = game.Workspace.Camera.FieldOfView
fovbutton.MouseButton1Down:Connect(function()
if v < 120 and v > 0 then
currentvalue.Text = "Current FOV: " + v.Text
f = v
else
currentvalue.Text = "Max FOV is 120, Minumum is 1"
wait(3)
currentvalue.Text = "Current FOV: " + v.Text
end
end)
also this starts happening out of random when i click onto code instead of the normal flashing mouse thing where you are typing it's white and if I try type it deletes the character in front of it

2 comments
Don't use game.Workspace.Camera.FieldOfView. Use workspace.CurrentCamera
Use game.Workspace.CurrentCamera I don't know why it's better but thet's what people recomend