Problem with script!

Hello everyone, I have a problem that my script does not work if the backpack is Anchored, but if it is not Anchored, then such cracks appear. I’m asking for help!

local gui = script.Parent
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local uperTorso = character:WaitForChild("UpperTorso")
local backPack = game.Workspace:WaitForChild("backpack1")
local backpack1 = backPack:GetChildren()
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")


local trashFrame = gui.shop1.CanvasGroup.ScrollingFrame.trash
local trashButton = trashFrame.TextButton
local blackTrash = trashFrame.lockTrash

trashButton.MouseButton1Click:Connect(function()
	blackTrash.Visible = false
	trashFrame.UIStroke.Color = Color3.new(0.439216, 0.905882, 0.219608)

	for i, part in pairs(backpack1) do
		local weld = Instance.new("Weld")
		weld.Part0 = uperTorso
		weld.Part1 = part
		weld.C0 = CFrame.new(0, 0, 1) 
		weld.Parent = backPack

		backPack.Parent = character
	end
end)

Maybe try to use weld constraints instead of just welds. However, I think your issue might be that you backpack is welding all the parts together using the same C1 (which you leave blank, so it defaults to CFrame.new(0,0,0) If you do not have the origins of each part of the backpack to be exactly the same, this will cause the pieces of the backpack to ‘snap’ together at their origins, so origins that are different will show the pieces being offset.

Ya i’ve had the same issues before. This can happen if you’re using welconstraints to weld the whole backpack together

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.