If you own, play, etc. any sort of combat game, especially one that relies heavily on character hitboxes, you know how annoying it is when people abuse the busted hitboxes that some avatar/body types have.
I’ve been trying to solve this problem myself recently on 2 Player Military Tycoon, and I was not able to find much from my research, besides people telling me to make the game R6 instead of R15, or forcing the blocky avatar on all players, regardless of their body type - punishing 95% of players just to stop 5% of the ones using these busted hitbox characters.
With this below script, you’ll be able to filter out Stick Bug characters, as well as other ones that have similar hitbox issues!
This system might not stop alll avatar types with busted hitboxes, but it will definitely stop the most egregious ones, while letting the “normal” ones pass through.
local plrs = game:GetService("Players")
local maxBustedParts = 7 --- change this to whatever. currently set that if roughly half the character uses unwanted body types, it triggers filter
local function plrAdded(player:Player)
local function charAdded(char:Model)
local hum = char:FindFirstChildOfClass("Humanoid")
---check for blacklisted items
local numBlackListed = 0
local headBlackListed = false
for _,i in pairs(char:GetChildren()) do
if i:IsA("BasePart") then
---print(tostring(i).." Magnitude: "..i.Size.Magnitude) --- test/debug purposes
if i.Size.Magnitude < 1 then
if i.Name == "Head" then
headBlackListed = true --- probably useless functionality but whatever
end
numBlackListed += 1
end
end
end
local function fixHum(all:boolean)
local success, result = pcall(plrs.GetHumanoidDescriptionFromUserId, plrs, player.UserId)
if success then
if result then
result.Head = 0
if all then
---result.BodyTypeScale = 0
--- uncomment the above line if you want to use absolute classic scale
result.Head = 0
result.LeftArm = 0
result.LeftLeg = 0
result.RightArm = 0
result.RightLeg = 0
result.Torso = 0
end
hum:ApplyDescription(result)
end
else
warn(result)
end
end
if hum then
if numBlackListed >= maxBustedParts then
warn(tostring(player).." has blacklisted body type(s)...")
fixHum(true)
elseif headBlackListed then
warn(tostring(player).." has blacklisted head...")
fixHum()
end
end
---end check
end
player.CharacterAdded:Connect(charAdded)
if player.Character then
charAdded(player.Character)
end
end
plrs.PlayerAdded:Connect(plrAdded)
for _,i in pairs(plrs:GetPlayers()) do
plrAdded(i)
end
Let me know what you think, and if this has been any use!