Uis not detecring ended

You can write your topic however you want, but you need to answer these questions:

  1. **What do you want to achieve?**make it easy to swap ouuta firstp and thirdp easily without touching plasti

  2. What is the issue? stuck in fp

  3. What solutions have you tried so far? none

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!



game:GetService("UserInputService").InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton2 then
game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
    end
end)

game:GetService("UserInputService").InputEnded:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton2 then
game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic
    end
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.

I tested your script. It’s detecting input ended and changing the camera mode, but it’s just that classic camera mode doesn’t automatically zoom out the camera. So I think your solution would be to just after you put the camera mode into classic, change the player’s CameraMinZoomDistance to edit the zoom and then change it back to 0.5.

Documentation for the property can be found here:
https://developer.roblox.com/en-us/api-reference/property/Player/CameraMinZoomDistance