local Hitboxes = {'Head', 'Torso', 'LeftUpperArm', 'RightUpperArm', 'LeftLowerLeg', 'RightLowerLeg'} local hitbox = Hitboxes[math.random(1,#Hitboxes)] print(hitbox) -- prints out hitbox print(game.Players.LocalPlayer:FindFirstChild(hitbox)) -- prints out nil
It is printing out nil because it is searching for a hitbox inside of the player, not the character. Change it to this:
local Hitboxes = {'Head', 'Torso', 'LeftUpperArm', 'RightUpperArm', 'LeftLowerLeg', 'RightLowerLeg'} local hitbox = Hitboxes[math.random(1,#Hitboxes)] print(hitbox) --prints out a hitbox print(game.Players.LocalPlayer.Character:FindFirstChild(hitbox)) -- also prints out a hitbox