You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I want to position the part directly behind the player.
- What is the issue? Include screenshots / videos if possible!
It positions smaller sized parts better but it doesnt work with bigger parts
- 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.