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

How to make accessories visible in first person?

Asked by 4 years ago

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

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 royaltoe 5144 — 4y

2 answers

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

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)

1
ohhhh maybe I'll try it TheRealPotatoChips 793 — 4y
1
OMG THANKS MAN I WAS SO DUMB THANKS TheRealPotatoChips 793 — 4y
0
Happens to the best of us :) Utter_Incompetence 856 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

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

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 GriffthouBiff 147 — 4y

Answer this question