So this is a script that destroys all the hats of the model's children, how can I make it that it destroys all hats except hat (KnightHat)?
Tried doing 'not hat' but not working?
local hat = game.ServerStorage.Hats.KnightHat:Clone()
local children = clone:GetChildren()
for I, V in pairs(children) do
if V.ClassName == "Hat" then
V:Destroy(not hat)
end
end

2 comments
Well you COULD always destroy all the hats, then clone a hat
Can't do that in the script I'm making because it wouldn't work.