Does each hat have it's own AttachmentPos?
local repstorage = game:GetService("ReplicatedStorage")
local hairboy = repstorage.HairsBoy
local hairgirl = repstorage.HairsGirl
local discoafro = hairboy.DiscoAfro
local boolSpam = Instance.new("BoolValue")
boolSpam.Name = "There"
boolSpam.Parent = char
boolSpam.Value = false
imageButton1.MouseButton1Click:connect(function()
if boolSpam.Value == false then
print(discoafro.Name)
local h = Instance.new("Hat")
local p = discoafro
p.Parent = h
p:Clone()
h.Parent = char
h.Name = "DiscoAfro"
p.Position = head.Position
p.Rotation = CFrame.fromEulerAnglesXYZ(-180, -0, -180)
end
boolSpam.Value = true
end)
I did this way to try to add the hat to my character. Is there any more efficient way of making this?
