Had a working shower that removed clothes in shower, and gave them back after, they now do not work with filtering, tried adding remoteevents but did not work. Both are normal scripts. I tried adding remote events to them, but nothing happaned, and the output is not giving me any errors.
Script 1 in the Shower
function onTouch(part)
local human = part.Parent:findFirstChild("Humanoid")
if human ~= nil then
if part.Parent:findFirstChild("Torso"):findFirstChild("roblox") ~= nil then
part.Parent:findFirstChild("Torso"):findFirstChild("roblox").Texture=""
end
local all = part.Parent:GetChildren()
for i = 1, #all do
if all[i].ClassName == "ShirtGraphic" or all[i].ClassName == "Shirt" then
all[i].Parent = script.Parent.Parent.Closet.ShirtHolder
elseif all[i].ClassName == "Pants" then
all[i].Parent = script.Parent.Parent.Closet.PantsHolder
end
end
end
end
script.Parent.Touched:connect(onTouch)
Script 2 in the closet.
function onTouch(part)
print("I wuz touched!")
local human = part.Parent:findFirstChild("Humanoid")
if human ~= nil then
print("I wuz touched by a humanoid!")
local all = script.Parent.Parent.PantsHolder:GetChildren()
for i = 1, #all do
if all[i].ClassName == "Pants" then
all[i].Parent = part.Parent
if script.Parent.Parent.Parent.Closet.PantsHolder.Torso:FindFirstChild("roblox") ~= nil then
script.Parent.Parent.Parent.Closet.PantsHolder.Torso:FindFirstChild("roblox"):Remove()
end
end
end
local all = script.Parent.Parent.ShirtHolder:GetChildren()
for i = 1, #all do
if all[i].ClassName == "ShirtGraphic" or all[i].ClassName == "Shirt" then
all[i].Parent = part.Parent
if script.Parent.Parent.Parent.ShirtHolder.Torso:FindFirstChild("roblox") ~= nil then
script.Parent.Parent.Parent.ShirtHolder.Torso:FindFirstChild("roblox"):Remove()
end
end
end
end
end
script.Parent.Touched:connect(onTouch)

1 comment
This isn't request site :3