How do i change the tranparency of the handle of a accessory

Hi, I want to make a script when you press a button you make a sort of dash and turn invisible for a short time. I am almost done with it but i dont know how i turn accessories invisible.

script.Parent.SoruEv.OnServerEvent:Connect(function(player)
	
	local char = player.Character
	
	local children = char:GetChildren()
	

	
	char.Humanoid.WalkSpeed = 100
	for i , v in pairs(children)  do
		if v:IsA("BasePart") and   then
			v.Transparency = 1
			
		end
		
	end
	
	wait(0.7)
	char.Humanoid.WalkSpeed = 16
	for i , v in pairs(children)  do
		if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart"  then
			v.Transparency = 0
			
		end
	end
	
end)

Does anyone know how to find a handle of a accessory and how to add that in my script?

Thanks

Something like this might get you on the right track! (Sorry if I made any typos, this isn’t meant ot be copy and pasted, just meant to give u an idea on how to solve your problem)

local function HideAccessories()
    for Index, Object in pairs(character) do
        if Object:IsA("Accessory") then
            Object.Handle.Transparency = 0
        end
    end
end

I recommend typing out your variable names so you remember what they are later on! (Counters like i are fine but v stands for value so maybe replace v with what you’re trying to find or iterating through)

Thanks @Bearturnedhuman for the tip, i used your idea and now it works.

1 Like

I’m more than happy to help! Good luck on your programming adventure!