Hi, I’m currently trying to make a Uniform saving system using a button. The problem is that if you save your Uniform into a folder it wouldn’t copy the actual shirt.
This is the actual shirt I saved:
And this is the one you get when you save it:
It copies the original roblox shirt instead of the custom template I made. And this is the script I made:
local Player = game.Players.LocalPlayer
local Char = Player.Character
local UniformPack = Player:FindFirstChild("UniformPack")
local MainShirt = game.Workspace[Player.Name]:WaitForChild("Shirt")
local MainPants = game.Workspace[Player.Name]:WaitForChild("Pants")
local MainShirtClone = MainShirt:Clone()
local MainPantsClone = MainPants:Clone()
script.Parent.MouseButton1Click:Connect(function()
UniformPack:ClearAllChildren()
MainShirtClone.Parent = UniformPack
MainPantsClone.Parent = UniformPack
end)
I’m still trying to find a solution but I can’t find any posts related to this.
here i made your script performance better, sometimes it can break.
i replaced
local Player = game.Players.LocalPlayer
local Char = Player.Character
local UniformPack = Player:FindFirstChild("UniformPack")
local MainShirt = game.Workspace[Player.Name]:WaitForChild("Shirt")
local MainPants = game.Workspace[Player.Name]:WaitForChild("Pants")
local MainShirtClone = MainShirt:Clone()
local MainPantsClone = MainPants:Clone()
to
local Player = game.Players.LocalPlayer
local Char = Player.Character or Player.Character:Wait()
local UniformPack = Player:FindFirstChild("UniformPack")
local MainShirt = Char:WaitForChild("Shirt")
local MainPants = Char:WaitForChild("Pants")
local MainShirtClone = MainShirt:Clone()
local MainPantsClone = MainPants:Clone()