So I have this script that uses weld, and I want to make it a weld constraint, as I have heard thats more reliable. But that does not use C0, C1, etc. any help?
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if player:WaitForChild("leaderstats").Belts.Value == 1 then
print("FENDIII")
wait(1)
local newRadio = Fendi:Clone()
newRadio.Parent = character
newRadio.CFrame = character:WaitForChild("LowerTorso").CFrame * CFrame.Angles(0,3.14,6) -- or Torso if you use R6
local weld = Instance.new("Weld")
weld.Part0 = newRadio
weld.Part1 = character:WaitForChild("LowerTorso")
weld.C0 =newRadio.CFrame:inverse()
weld.C1 = character:WaitForChild("LowerTorso").CFrame:inverse()
weld.Parent = newRadio
end
end)
end)
Reading from the Wiki, no need to set those offsets:
WeldConstraint, for a newer alternative using the constraints system that does not require C0 or C1 properties to be manually set
Alternatively, try using attachments and converting the belt into an accessory. Remember you’ll have to name the attachment to respective attachment on character.
Simply change the created weld to WeldConstraint and remove C0/C1. Fairly primitive problem.
That being said, slightly off-topic, but I don’t fully agree with the way you handle this system. I always prefer to have my items pre-weld up so that I just need to clone, position and attach an assembly as necessary. Feels much cleaner and usable.