Hello I want make shooting game and I don’t know how to force people in first person.
If you know please reply
<3 Thanks
Hello I want make shooting game and I don’t know how to force people in first person.
If you know please reply
<3 Thanks
take a look at this:
You can do what @Cornbody_onroblox did, or another way of doing it is using .CameraMode
property of StarterPlayer
by setting it to Enum.CameraMode.LockFirstPerson
(There is also for LockThirdPerson
, meaning you can zoom normally but you can’t get in first person)
local player = game.Players.LocalPlayer
player.CameraMode = Enum.CameraMode.LockFirstPerson
It took me less than a second to search this up and find out what to do, it’s really better to try searching by yourself first, then ask the people if you’re stuck
The starterplayer object in the explorer has a property called:
CameraMaxZoomDistance
CameraMinZoomDistance
and the CameraMode as @starmaq said
local player = game.Players.LocalPlayer
Identifies the player as a local player
player.CameraMode = Enum.CameraMode.LockFirstPerson
Locks the player in first person.
I recommend looking properly and not asking the forum as your first option. Excuse me, but laziness is a trait some developers have. Don’t be like those developers.
I just know that there lock in first person thing
Hello, this is something old, I know… but how would you make it so that when you touch a block, the first person activates the same with the third person?
Set the cameramode to Default.
Tysm For Helping Me Copy this script! To help you! With ur game!: local Player = game.Players.LocalPlayer
local PlayerMouse = Player:GetMouse()
PlayerMouse.Icon = “rbxassetid://11514712616”
local player = game.Players.LocalPlayer
player.CameraMode = Enum.CameraMode.LockFirstPerson
Put this in a LocalScript
local player = game.Players.LocalPlayer
local hum = script.Parent:WaitForChild("Humanoid")
local ThirdPersonPart = game.Workspace:WaitForChild("ThirdPersonPart") -- set the name to your third person part
local FirstPersonPart = game.Workspace:WaitForChild("FirstPersonPart") -- set the name to your first person part
ThirdPersonPart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("Humanoid") == hum then
player.CameraMode = Enum.CameraMode.Classic
end
end)
FirstPersonPart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("Humanoid") == hum then
player.CameraMode = Enum.CameraMode.LockFirstPerson
end
end)