So I am trying to make a show and hide feature for a hat. I'm doing by going to the handle and changing its transparency.
Here Is My Script For Cloning The Hat From ServerStorage (Script):
game.Players.PlayerAdded:Connect(function(player)
wait()
local AddMask = game.ServerStorage.SleepingMaskHat:Clone()
AddMask.Parent = player.Character
end)
Here Is My Script For Changing(LocalScript):
script.Parent.MouseButton1Click:Connect(function(player)
player.Character.SleepingMaskHat.Handle.Transparency = 1
end)
Error Message: attempt to index local 'player' (a nil value)

1 comment
Thank You So Much!