How do I give give shirts and pants to players?

Alrighty so basically I’ve been trying to make it so when the game detects a certain player it give them a shirt/pants but nothing I’ve done seems to work

this is the code I’ve been using

local player = game:GetService("Players")



if player.Name == "Ac0ny" then
	local Shirt = Instance.new("Shirt", player.Character)
	local Pants = Instance.new("Pants", player.Character)
	Shirt.ShirtTemplate = "rbxassetid://8285087217"
	Pants.PantsTemplate = "rbxassetid://8285168177"
end

I gtg rn but I think you have to delete the old shirts.

figured it out instead of deleting the old one i just changed the id