Hide tool in first person

Hello!

I am making server animations for the gun and followed @Headstackk tutorial. I am seeking for a way to hide the tool in first person because there is already a viewmodel.

Thanks !

1 Like

You can set all of the parts inside the tool’s transparency to 1. When ever the user is in first person.

1 Like

how do you detect if the user is in first person?

1 Like

you can check the LocalTransparencyModifier of the player’s character’s children.
for example: Head.LocalTransparencyModifier, Torso.LocalTransparencyModifier etc.

you could do something like this:
LocalScript in StarterCharacterScripts

local character = script.Parent

while wait(1) do -- checks every 1 second
    for i,v in pairs(character:GetChildren()) do
        if v.ClassName == 'Part' or v.ClassName == 'BasePart' then -- detects if it's a part
            if v.LocalTransparencyModifier == 1 then -- detects if it's transparent - in first person
                print('first person')
            elseif v.LocalTransparencyModifier == 0 then -- if the player isn't in first person then they are in third person
                print('third person')
            end
        end
    end
end

sorry if there are mistakes since I haven’t tested it.