Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I make a gun first person?

How can I make a gun first person? Any help please! Thanks!

2 comments

0

What, precisely, do you mean? CameraMode to first person or creating a gun?

0

Yeah cameraMode

2 answers

To set the player's camera to be first person, use the CameraMode property of the Player object.

So to get the player into first person when they equip the gun, we can use the Equipped event.

script.Parent.Equipped:connect(function()
	-- Set the player's CameraMode to LockFirstPerson
end)

And to take them out of first person when the unequip the gun we can use the Unequipped event.

script.Parent.Unequipped:connect(function()
	-- Set the player's CameraMode to Classic.
end)

Setting the player's camera mode is as simple as setting a part's name.

game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson

2 comments

0

Mhm. This post is more detailed than mine, upvoted :)

0

Thanks man!

This discussion is preserved as it was. New answers, comments, and votes are closed.