✓ Accepted answer
I'm not 100% sure what you want to accomplish. Although, here are some things to try...
This is inside a GUI so just make it so when you click the gui, it starts. You'll use MouseButton1Click , if this is not what you want, then try what I've wrote bellow.
Currently, you are not setting a parent to the cloned hat. You will not have the transparent part anywhere because of this. You will need your script to look like this when you set it to a parent.
local PlayersService = game.Players
local Character = PlayersService.localPlayer.Character
local items2 = Character:GetChildren()
for i,j in pairs(items2) do
if j.ClassName == 'Hat' then
Clone7 = j:Clone()
Clone7.Parent = game.Workspace
Clone7.Handle.Transparency = .5
end
end
You may also try a whole new Variable instead of Clone7, I don't think this will do anything.
Sometimes adding a wait() for Localscript will help (In start of code)
2 comments
What does the output say?
I don't know it does not say anything.