You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to change the Orientation of an Attachment, using AttachmentPoint -
What is the issue? Include screenshots / videos if possible!
Everytime I try to change the orientation it tells me that orientation is not a part of CFrame -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried changing the Orientation to LookVector, Using CFrame.Angle but I keep getting the same error, I am un sure where to proceed from this point as every solution I try doesn’t seem to work.
local function applyAppearance(dummy, normalData, superHeroData)
local slotData = superHeroData or normalData
if not slotData then
return
end
for slotName, slotValue in pairs(slotData) do
print("Slot Name:", slotName)
print("Slot Value:", slotValue)
if slotName == "BodyColor" then
local bdc = Instance.new("BodyColors")
bdc.Name = "BodyColor"
bdc.HeadColor3 = Color3.fromHex(slotValue)
bdc.LeftArmColor3 = Color3.fromHex(slotValue)
bdc.LeftLegColor3 = Color3.fromHex(slotValue)
bdc.RightArmColor3 = Color3.fromHex(slotValue)
bdc.RightLegColor3 = Color3.fromHex(slotValue)
bdc.TorsoColor3 = Color3.fromHex(slotValue)
bdc.Parent = dummy
elseif slotName == "FirstHair" then
local hairModel = game.ReplicatedStorage.Hair1[slotValue]
if hairModel then
local newHair = hairModel:Clone()
newHair.Name = "FirstHair"
newHair.Parent = dummy
-- Create a new Weld between the newHair.Handle and the dummy's head
local weld = Instance.new("Weld")
weld.Name = "HeadWeld"
weld.Parent = dummy.Head
weld.Part0 = dummy.Head
weld.Part1 = newHair.Handle
local Position = newHair.AttachmentPoint.Position
local Orientation = newHair.AttachmentPoint.Orientation
weld.C1 = (CFrame.new(0, 5, 0) * CFrame.Angles(0, math.rad(Orientation.Y), 0))
else
print("Hair model not found:", slotValue)
end
end
end
end