Accessory Handle Transparency won't get back to normal when tool is Unequipped

I have made a script that Turns an accessories transparency to 1 when Equipped but when the tool is Unequipped the transparency won’t get back to normal.

Here’s the code:

local Rifle = script.Parent

Rifle.Equipped:Connect(function()
	local Char = Rifle.Parent
	
	local RifleWeapon = Char:WaitForChild("RifleWeapon")
	
	RifleWeapon.Handle.Transparency = 1
end)

Rifle.Unequipped:Connect(function()
	local Char = Rifle.Parent

	local RifleWeapon = Char:WaitForChild("RifleWeapon")

	RifleWeapon.Handle.Transparency = 0
end)

Do you use the Roblox function for unequipping? This means that it will not be under character but in the backpack of the player, so probably script stuck on WaitForChild since it’s not there.

1 Like

Oh, didn’t realise that
Know any ways to get player’s char from backpack?