✓ Accepted answer
You can solve this issue by using WeldConstraints, the new method for welding on Roblox.
Before WeldConstraints were added, Welds were used to attach things together. As these required two different CFrame offsets to determine the location of one part relative to the other, they were slightly complicated to use. However, the introduction of WeldConstraints makes welding super simple and fun!
When you want to weld one part to another, there are 3 main steps:
1. Move the part you want to weld to the position you want to weld it to (often by setting its CFrame).
2. Create the WeldConstraint and put it in the part.
3. Set the Part0 property of the WeldConstraint to the first part, and the Part1 property of the WeldConstraint to the second part.
For example, if you wanted to weld a piece of armour (such as a chestplate) to the character, all you have to do is follow these steps. If you have a copy of the armour inside ReplicatedStorage and called it Armour, the script might look something like this:
local function EquipArmour(Char,Armour)
local NewArmour = Armour:Clone()
local Root = Char:WaitForChild("HumanoidRootPart")
NewArmour:SetPrimaryPartCFrame(Root.CFrame)
local Weld = Instance.new("WeldConstraint")
Weld.Part0 = NewArmour.PrimaryPart
Weld.Part1 = Root
Weld.Parent = NewArmour
NewArmour.Parent = Character
end
local Armour = game:GetService("ReplicatedStorage").Armour
game.Players.PlayerAdded:Connect(function(Plr)
Plr.CharacterAdded:Connect(function(Char)
EquipArmour(Char,Armour)
end)
end)
This example work the same way for your crystal part. However, when you set the orientation, it will remain connected to your character, not breaking the weld.
Hope this helps!
2 comments
you can change the orientation of the weld by changing it's cframe, that could work..
If i do that the whole player that its welded to starts turning to