Recently go into scripting and wanted to make a character customization menu as my first project, but I can't get it to work. Sorry if there are any obvious errors that I didn't notice!
local plr = script.Parent.Parent.Parent.Parent.Parent
local humanoid = script.Parent.Parent.Parent.Parent.Parent:FindFirstChild("Humanoid")
function onClicked()
if humanoid ~= nil then
local shirtchange1 = game.ReplicatedStorage.Shirt1:clone()
shirtchange1.Parent = plr
if shirtchange1.Parent == plr then
plr:FindFirstChild("Shirt"):Destroy()
end
end
end
script.Parent.MouseButton1Click:connect(onClicked)

2 comments
Thank you so much!
Yep!