Hi! So I know how to make it that a player can zoom from 1st person to 3rd person but my question is how would I make it so if the player hits a letter like "t' they can switch views?
There is a feature called "LockFirstPerson". You could also use UserInputService to see if they pressed a key
UserInputService acts like KeyDown but it isn't actually deprecated and it takes ANY type of input(Clicking, Chatting, Etc).
local uis = game:GetService("UserInputService") uis.InputBegan:connect(function(input, chat) if input.KeyCode == Enum.KeyCode.T and not chat then --If they press T and is not chatting/typing into a textbox then... print("Pressed T!") end end)
A players has something called CameraMode. There is Classic(Third Person) and LockFirstPerson(1st person obviously.)
game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson wait(3) game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.Classic
--LocalScript local uis = game:GetService("UserInputService") local plyr = game:GetService("Players").LocalPlayer uis.InputBegan:connect(function(input, chat) if input.KeyCode == Enum.KeyCode.T and not chat then if plyr.CameraMode == Enum.CameraMode.Classic then plyr.CameraMode = Enum.CameraMode.LockFirstPerson else plyr.CameraMode = Enum.CameraMode.Classic end end end)
Hope it helps!