Removing/Blacklisting certain bundles/packages from your game!

Sup!

I’ve recently seen people who wanted to remove certain packages/bundles from their game, specifically ones that give your character an advantage In height/width/etc…

Well look no further, because you’re In the right place!

First of all, let’s talk about HipHeight,

A normal character’s HipHeight Is 2.

  • HipHeight determines the distance (in studs) off the ground the Humanoid.RootPart should be when the Humanoid is standing.
    image

  • The smaller your HumanoidRootPart Is (Height, Width, etc), you’ll be able to go through spaces other players can’t go.
    image (1)

Setting the Humanoid’s HipHeight to 2, will make the HumanoidRootPart almost as tall as other ones.

If you want to remove certain bundle bodyparts you can use this code I made with instructions on how to use it!

FEEDBACK IS ALWAYS WELCOME :slight_smile:

--[[

Made by @sine_v

|HOW TO USE?|

Enter a bundle's BodyPart HumanoidDescription ID,
It will work with any body part (Torso, Arm, Leg, etc)

I've put some ID's In here, including the Magma Fiend and Skelly.

]]


local BlacklistedParts = {
	
	[2492671662] = true,
	[2492670347] = true,
	[2492674027] = true,
	[2510272577] = true,
	[2608538559] = true,
	[2608536258] = true,
	[4381823417] = true,
	[2608539495] = true,
	
}


local CustomHipHeight = 2 --Default HipHeight (2)
local UseHipHeight = false --Changes character's HipHeight, leave false If you don't wanna use it.


local PlayerService = game:GetService("Players")

PlayerService.PlayerAdded:Connect(function(Player)

	Player.CharacterAdded:Connect(function(Character)

	local HumanoidDescription = Character:WaitForChild("Humanoid"):GetAppliedDescription()
		
	if UseHipHeight == true then
		Character.Humanoid.HipHeight = CustomHipHeight
	end
		
	if BlacklistedParts[HumanoidDescription.Torso] 
		
	or BlacklistedParts[HumanoidDescription.LeftLeg] 
	or BlacklistedParts[HumanoidDescription.RightLeg] 
	or BlacklistedParts[HumanoidDescription.LeftArm] 
	or BlacklistedParts[HumanoidDescription.RightArm] 
	or BlacklistedParts[HumanoidDescription.Head] 
			
	then
			
	HumanoidDescription.LeftLeg = 0
	HumanoidDescription.RightLeg = 0
	HumanoidDescription.Torso = 0
			
	--NOTE: LEGS AND TORSO ARE MOST IMPORTANT--
	--THEY'RE THE MAIN THINGS THAT CHANGE YOUR CHARACTER'S SIZE!--
		
	--[[HumanoidDescription.LeftArm = 0
	HumanoidDescription.RightArm = 0
	HumanoidDescription.Head = 0]]

	Character.Humanoid:ApplyDescription(HumanoidDescription)

	end

	end)

end)
3 Likes

Code sample has a few problems.

Failure to account for initial state: where there’s an added signal there’s an opportunity for items to be added ahead of the connection. This is especially true for deferred which will become the standard of programming in the future (it has been delayed by a large time period for reevaluation and due to developer reaction). You will need to collect items that already exist ahead of the connection.

local function playerAdded(player)
    local function characterFunction(character) -- Characters need state too
    end

    player.CharacterAdded:Connect(characterFunction) -- New
    if player.Character then -- Existing
        characterFunction(player.Character)
    end
end

Players.PlayerAdded:Connect(playerAdded) -- Handle new
for _, player in ipairs(Players:GetPlayers()) do -- Handle existing
    playerAdded(player) -- May also task.spawn/defer this
end

Using wait in place of events to interval a loop: the whole loop is a problem overview that builds upwards from the practices being used.

  • Using the legacy wait instead of task.wait.

  • Using a wait instead of an available event. If checking for parent changes, use AncestryChanged:Wait() to interval the loop so it starts a new interval when AncestryChanged fires rather than off of an arbitrary number.

  • The character in CharacterAdded is not guaranteed to be parented to the workspace as of current avatar loading procedures. Ideally don’t wait for it at all like this. Wait for other dependencies or use a way to “ensure” the character parents to the workspace (e.g. Promise, my favourite).

Don’t assume instances exist: again, as of current avatar loading procedures, the Humanoid is not guaranteed to exist in the character at the same time CharacterAdded fires. Use WaitForChild and store the Humanoid in a variable.

5 Likes