I am making this script which adds a back part as a hitbox to the player’s humanoid root part, but it doesn’t work
local backbox = script.Parent
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character
if not character or not character.Parent then
character = player.CharacterAdded:wait()
end
wait(1)
if character then
local hrp = character.HumanoidRootPart
local weld = Instance.new("Weld")
weld.Part0 = hrp
weld.Part1 = backbox
weld.Parent = script.Parent
backbox.Position = hrp
end
Im stupid, just ignore when i said you never defined part 0. Is the local script under the workspace?
also im not sure if you are changing the position of part0, you are only parenting it under the humanoid root part, and not changing the position. Im not on my computer right now so i dont remember if it automatically moves the attachment under the parent