So I’m Making A Character Customize System So When The Player Try’s To Pick A Different Skin Color I Wanna Destroy It And Clone A New One Into The Player, But When I Try Nothing Happens No Errors And It Doesn’t Delete It And It Doesn’t Clones The New One.
Script:
local skinModule = require(script.Skins)
game.ReplicatedStorage.Events.Skin.ColorEvent1.OnServerEvent:Connect(function(plr)
skinModule.SkinOne(plr)
end)
Module:
local skinModule = {}
function skinModule.SkinOne(plr)
for i,v in pairs(plr:GetDescendants()) do
pcall(function()
if v:IsA("BodyColors") then
v:Destroy()
end
end)
end
local SkinOne = game.ServerStorage.CharacterCustomize.Skin.SkinOne:Clone()
SkinOne.Parent = plr
end
return skinModule