Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make a gun first person?

Asked by 10 years ago

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

0
What, precisely, do you mean? CameraMode to first person or creating a gun? TheMyrco 375 — 10y
0
Yeah cameraMode alan3401 28 — 10y

2 answers

Log in to vote
0
Answered by
TheMyrco 375 Moderation Voter
10 years ago

Take a look at this ;)

Ad
Log in to vote
2
Answered by
User#2 0
10 years ago

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
0
Mhm. This post is more detailed than mine, upvoted :) TheMyrco 375 — 10y
0
Thanks man! alan3401 28 — 10y

Answer this question