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

Anybody know how to remove hair or make it transparent??

So I'm making an ssj script for a game and can't figure out how to make the hair transparent or just remove it. Please help ;-;

This is what I have tried:

--This is a local script in the StarterPack
local jun = script.Parent.Parent 
if jun.Character:FindFirstChildofClass("Accessory") ~= nil then
local Hair = jun.Character:FindFirstChildofClass("Accessory")
Hair.Handle.Transparency = 1
end

2 comments

0

It's nice to see a fellow DBZ fan. :)

0

:3

1 answer

✓ Accepted answer

Hey there! The issue is that your 'jun' pointer was to 'Players.Player1', which does not include the player's model. A quick solution that keeps the same premise as the script you've given us to work with is as follows:

--This is a local script in the StarterPack

local playerIndex = script.Parent.Parent.Name;
local player = workspace:WaitForChild(playerIndex);

for _, accessory in pairs(player:GetChildren()) do
	if (accessory.ClassName == "Accessory") then
		accessory.Handle.Transparency = 1;
	end
end

Essentially, we find the local player's name and index it in the workspace using the :WaitForChild(string 'childName') method, and then looping through the player's model, setting the transparency of all accessory objects to 1.

Hope this helps!

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