Position part with changing size directly behind player

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I want to position the part directly behind the player.

  1. What is the issue? Include screenshots / videos if possible!

It positions smaller sized parts better but it doesnt work with bigger parts

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

Yes. I found nothing related.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

	local TouchedPart = false
	local backPart = char:FindFirstChild('BackPart')
	
	if backPart then
		local div = backPart.Size.Z * 0.505
		local weld = backPart:FindFirstChildWhichIsA('WeldConstraint')
		
		if weld then
			weld:Destroy()
		end
		
		backPart.Position = root.Position + Vector3.new(0, 0, -div)
		char:FindFirstChild('BackPart').Size = Vector3.new(20, 10, x)
		
		local weld = Instance.new('WeldConstraint')
		weld.Parent = backPart
		weld.Part0 = root
		weld.Part1 = backPart
		
		char:FindFirstChild('BackPart').Touched:Connect(function(hit)
			local ch = hit.Parent
			local human = hit.Parent:FindFirstChild('Humanoid')

			if human then
				if ch ~= character then
					TouchedPart = true
				end
			end
		end)
	end

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Well then looks like you got work to do

I did check I just found nothing related to it. I typed the wrong thing.