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
This is not how you format strings in Lua. You are formatting in the manner string + string, which in Lua literally means it will attempt to add these two strings together. The Lua string concatenation operator is ".."
local formattedString = (string1..string2)
or in your case,
currentvalue.Text = ("Current FOV: "..v.Text)
note1: You will need to access the client's CurrentCamera instead of workspace's Camera.
note2: To fix the flashing white and odd character manipulating, try pressing end on your keyboard while inside of the script.