Hello Devforum,
I want to create an FPS game for fun but I am unaware on how I can show arms in first person. What I mean is players can see their arms in first person when they have their weapon out. How can I do this?
Hello Devforum,
I want to create an FPS game for fun but I am unaware on how I can show arms in first person. What I mean is players can see their arms in first person when they have their weapon out. How can I do this?
The link that @Miserable_Haven posted works and is technically better, but from my experience making FPS games, ViewModels sometimes can sometimes be a huge hassle to deal with. If you want a simpler alternative, you can use this simple script instead. All it does is make the player’s arm visible when a tool is equipped.
-- LocalScript in StarterGui (or anywhere else the LocalScript also works in!)
local Player = game.Players.LocalPlayer
local ArmNames = {
"Left Arm",
"Right Arm",
"LeftHand",
"LeftLowerArm",
"LeftUpperArm",
"RightHand",
"RightLowerArm",
"RightUpperArm",
}
local function FirstPerson(Character)
for i, v in pairs(Character:GetChildren()) do
if table.find(ArmNames, v.Name) then
Character.ChildAdded:Connect(function(Child)
if Child.ClassName == "Tool" then
v.LocalTransparencyModifier = 0
end
end)
v:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
if not Character:FindFirstChildOfClass("Tool") then
return
end
v.LocalTransparencyModifier = 0
end)
end
end
end
Player.CharacterAdded:Connect(function(Character)
FirstPerson(Character)
end)
if Player.Character then
FirstPerson(Player.Character)
Player.Character.ChildAdded:Connect(function()
FirstPerson(Player.Character)
end)
end
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.