Hi guys. I need help for my script. I make a button changer face with succes, but io don´t know why the pants and shirt changer not work. Here is the script for the face changer:
script.Parent.MouseButton1Click:connect(function()
local selected = script.Parent.Parent.Parent.Selected
selected.Value = script.Parent.Name
local player = game.Players.LocalPlayer
local char = player.Character
local faces = char.Head:FindFirstChild(“face”) --face is the starterface of your character
faces:Destroy()
script.Parent.face:Clone().Parent = char.Head
end)
Here the one for pants or shirt changer:
script.Parent.MouseButton1Click:connect(function()
local selected = script.Parent.Parent.Parent.Selected
selected.Value = script.Parent.Name
local player = game.Players.LocalPlayer
local char = player.Character
local pant = char:FindFirstChild(“Pants”)
pant:Destroy()
script.Parent.pants:Clone().Parent = char.Pants --THIS LINE DON´T WORK
end)
Thx for helping