so i was watching a video how to make a hit box and the script was this
game.ReplicatedStorage.CombatHit.OnServerEvent:Connect(function(plr)
print(plr)
local hitbox = Instance.new("Part")
local rootPart = plr.Character.HumanoidRootPart
hitbox.Parent = workspace
hitbox.Anchored = true
hitbox.CanCollide = false
hitbox.Transparency = 0
hitbox.Size = Vector3.new(10,10,10)
hitbox.CFrame = plr.Character.rootpart.Cframe * CFrame.new(0,2,-5)
game.Debris:AddItem(hitbox,1)
end)
the game.Debris:AddItem(hitbox,1) is supposed to make the hitbox disappear and the hitbox.CFrame = plr.Character.rootpart.Cframe * CFrame.new(0,2,-5) is supposed to spawn the ("part") at the humanoidrootpart at (0,2,-5)