Hitboxes not working, at all

Hello! I’ve been working on an FPS game recently, and I obviously need to make hitboxes. I wrote a script that just clones the hitboxes from the workspace, and sets the CFrame of the new hitboxes to the player’s CFrame. However, this doesn’t seem to be working. The hitboxes are very off, and just dont work at all when a second player joins.

A screenshot of the player and the hitboxes:
image

Script:

local head = game.Workspace.hitbox_head:Clone()
local upper = game.Workspace.hitbox_chest:Clone()
local torso = game.Workspace.hitbox_torso:Clone()
local left = game.Workspace.hitbox_chest_left:Clone()
local right = game.Workspace.hitbox_chest_right:Clone()
local rleg = game.Workspace.hitbox_legs_right:Clone()
local lleg = game.Workspace.hitbox_legs_left:Clone()
head.Parent = script.Parent
upper.Parent = script.Parent
torso.Parent = script.Parent
left.Parent = script.Parent
right.Parent = script.Parent
rleg.Parent = script.Parent
lleg.Parent = script.Parent

Script:
while true do
	wait()
	head.CFrame = script.Parent.Head.CFrame
	upper.CFrame = script.Parent.UpperTorso.CFrame
	torso.CFrame = script.Parent.LowerTorso.CFrame
	left.CFrame = script.Parent.LeftLowerArm.CFrame
	right.CFrame = script.Parent.RightLowerArm.CFrame
	rleg.CFrame = script.Parent.RightLowerLeg.CFrame
	lleg.CFrame = script.Parent.LeftLowerLeg.CFrame
end

Thanks for helping!

… Why dont you use the body parts as hitboxes…?

thats a good point.

sometimes i overcomplicate things too much lmao

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