#Attachment.WorldPosition behavior unexpected?

2 messages · Page 1 of 1 (latest)

elder rose
#

It says for this property "Position of the attachment relative to the world rather than its own parent." but when I move the parent it is relative to the parent?

function Egg:setupEgg()
    local egg = self.instance
    local primaryPart = egg.PrimaryPart
    local promptAttachment = primaryPart.PromptAttachment
    -- Set the proximity prompt attachment to a world position offset from the egg
    local offset = CFrame.new(0, 2.4, 0)
    promptAttachment.WorldPosition = (primaryPart.CFrame * offset).Position
end