When you click this script, it is supposed to put your character into the Workspace, change their colors, and give them hats. Everything else works besides their color changing and them getting hats. There is no glitch in output, the script just doesn't do what it's supposed to do.
local player = script.Parent.Parent.Parent.Parent.Parent.Parent
local profilechar = player.CharProfiles.Profile1
local custom = profilechar.Appearance
local dude = player.Character
function onClicked()
player.CanLoadCharacterAppearance = false
player:LoadCharacter()
--dude.Parent = workspace
wait()
local cp = profilechar.Powers:getChildren()
for i = 1, #cp do
cp[i]:clone().Parent = player.Backpack
end
wait()
custom["Body Colors"]:clone().Parent = dude
if custom["Hat 1"]:GetChildren()[1]then
custom["Hat 1"]:GetChildren()[1]:clone().Parent = dude
end
if custom["Hat 2"]:GetChildren()[1]then
custom["Hat 2"]:GetChildren()[1]:clone().Parent = dude
end
if custom["Hat 3"]:GetChildren()[1]then
custom["Hat 3"]:GetChildren()[1]:clone().Parent = dude
end
script.Parent.Parent.Parent.Visible = false
script.Parent.Parent.Parent.Parent.Reset.Visible = true
--dude.Name = profilechar.Value
script.Parent.Parent.Parent.Visible = false
end
script.Parent.MouseButton1Click:connect(onClicked) |