I have a script in my Startergui that makes the arms visible in first person for r6
local player = game:GetService("Players").LocalPlayer
local character = player.character or player.characterAdded:Wait()
game:GetService("RunService").RenderStepped:Connect(function()
for i, part in pairs(character:GetChildren())do
if string.match(part.Name, "Arm")or string.match(part.Name, "Hand") then
part.LocalTransparencyModifier = 0
end
end
end)
How do i detect the tool equip so that i can set the transperncy to 0? It creates a bug where 2 hands are being displayed at once
Your code is basically asking to loop through all the parts in your children, and if its name has the word Arm or Hand in it, you set that part’s LocalTransparencyModifier to 0.
And you have two arms/hands, the left and the right.
local CharacterPartNames = {
"LeftHand";
"LeftUpperArm";
"LeftLowerArm";
"RightHand";
"RightUpperArm";
"RightLowerArm";
}
local MakeArmNonTransparent
Tool.Equipped:Connect(function()
MakeArmNonTransparent = game:GetService("RunService").RenderStepped:Connect(function()
for _, playerpart in pairs(character:GetChildren()) do
if playerpart:IsA("BasePart") and table.find(CharacterPartNames, playerpart.Name) then
playerpart.LocalTransparencyModifier = 0
end
end
end)
end)
Unequipped function:
Tool.Unequipped:Connect(function()
MakeArmNonTransparent:Disconnect()
end
I don’t know if this is the best way to do it but it works. Also, I am pretty sure that I just stole the renderstepped thing from the devforum so credits to whoever originally made it.
Edit: I am pretty sure that I got some parts of this script from this post.
No, my tool automatically shows the arms in first person, i just needed to figure out how to make it so that the tool disables the firstperson without a tool