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

How to make accessories visible in first person?

I used LocalTransparencyModifier to make the player's body parts visible, but how can we make the accessories visible?

game:GetService("RunService").RenderStepped:Connect(function()
	for i, v in pairs(Character:GetChildren()) do
		if v:IsA:("Accessory") then
			v.LocalTransparencyModifier = 0
		end
	end
end)

In the output is says:

LocalTransparencyModifier is not a valid member of Accessory

Help will be appreciated

1 comment

0

When I parent the handle to somewhere outside of the player such as the workspace it stays visible, but that's the best I got

2 answers

✓ Accepted answer

The handle is the actual thing you want to see, right? Put

game:GetService("RunService").RenderStepped:Connect(function()
    for i, v in pairs(Character:GetChildren()) do
        if v:IsA:("Accessory") then
            v.Handle.LocalTransparencyModifier = 0
        end
    end
end)

3 comments

1

ohhhh maybe I'll try it

1

OMG THANKS MAN I WAS SO DUMB THANKS

0

Happens to the best of us :)

It depends on what you are trying to achieve. I personally recommend parenting the accessory to the workspace and welding it to the character, as this will achieve exactly what you said you want while being easy to build upon. Furthermore this would be less requiring than what you wrote as iterating through a character every 60th of a second costs a lot.

I can't provide anything more without knowing specifics. Good luck with your game, feel free to ask more if you still have questions

1 comment

0

If you are worried about not being able to reference the accessory via the character because it's floating around in the workspace just keep the reference you use to weld it in a localscript. If the server needs to access the accessory then use a remoteEvent. Afak that's best practice for tools & stuff

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