This code is supposed to change the players pants and shirt
function onTouch(r) -- when the brick is touched
wait(1) -- waits one second
local p = r.Parent:WaitForChild("Pants") -- finds the pants from the player who touched it
local s = r.Parent:WaitForChild("Shirt") --finds the shirt
if (p ~= nil) then -- checks if it exists
p.PantsTemplate = "rbxassetid://146138748" -- changes the pants
s.ShirtTemplate = "rbxassetid://145609726" -- changes the shirt
end -- ends
end -- ends
script.Parent.Touched:connect(onTouch) -- connects

1 comment
Is there anything in the output? If not, try placing a print after the If on line 5 and observe the console in-game to see if the logic checks out. However, I'm a bit confused -- why do you only replace the pants AND shirt if the pants exist?