I am trying to ake a capture the flag, but I don't know how to make the flag stick to the back of the player. Does this have to do with the CFrame?
COMMUNITY QUESTION
How to make a flag stick to the back of a player?
1 answer
You can make it stick to the player with a 'WeldConstraint'. Here's how.
local weld = Instance.new("WeldConstraint")
weld.Part0 = flag
weld.Part1 = character.HumanoidRootPart -- I believe this works in both r6 and r15.
weld.Parent = flag
flag.CFrame = character.HumanoidRootPart.CFrame * CFrame.new(Vector3.new(0,0,-1)) --[[ This puts the flag on the player's back, but you can mess around with it and see what works best for you. ]]
If you have any questions, please comment.
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
i don't have time to write a proper response, but weld the flag to the back of the model using weld constraints then set the primarypartcframe of the flag using flag:SetPrimaryPartCFrame() to be the cframe of the players humanoid root part. then offset the flag by half of the humanoid root part's size on the z axis to make sure that it is on the players back instead of in themiddle of the humanoid
after welding cframe goes something like this: flag:SetPrimaryPartCFrame(character.HumanoidRootPart.CFrame * CFrame.new(0,0,character.HumanoidRootPart.Size.Z/2))
ok thank you so much
np np lmk if you need more help
It's easier with Attachments.