My problem is the model is not changing CFrame and it does not have error, model has primary part.
local players = game:GetService('Players')
players.PlayerAdded:Connect(function(player)
local valueAssets = Instance.new('Folder', player)
valueAssets.Name = 'valueAssets'
local division = Instance.new('StringValue', valueAssets)
local subdivision = Instance.new('StringValue', valueAssets)
local isOnMainTeam = false
local function makeBeltForPlayer(char)
local belt = game.ServerStorage.Belt:Clone()
local lowertorso = char.LowerTorso
local weld = Instance.new('WeldConstraint', lowertorso)
weld.Part0 = lowertorso
weld.Part1 = belt.Middle
belt.Parent = char
belt:SetPrimaryPartCFrame(belt:GetPrimaryPartCFrame() * lowertorso.CFrame)
end
player:GetPropertyChangedSignal('TeamColor'):Connect(function()
if player.TeamColor == game.ReplicatedStorage.MainTeam.Value then
isOnMainTeam = true
else
isOnMainTeam = false
end
end)
player.CharacterAdded:Connect(function(character)
if isOnMainTeam then
task.wait(.1)
makeBeltForPlayer(character)
end
end)
end)
The belt didn’t change CFrame. PrimaryPart is middle.
Each part inside has WeldConstraint.