I made a code that changes their primary Humanoid Hipheight, Hitbox size and RootPart size, but is it possible to change the Character’s LowerTorso’s Height to make their Feet on the ground?
My ServerScriptService Code:
local Players = game:GetService("Players")
local PhysicsService = game:GetService("PhysicsService")
if not PhysicsService:IsCollisionGroupRegistered("CantCollide") then
PhysicsService:RegisterCollisionGroup("CantCollide")
PhysicsService:CollisionGroupSetCollidable("CantCollide", "Default", false)
else
print("Registered Collision Group detected!")
end
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:FindFirstChildOfClass("Humanoid")
local rootPart = character:WaitForChild("HumanoidRootPart")
local lowerTorso = character:WaitForChild("LowerTorso")
local hitBox = character:WaitForChild("HumanoidHitBox")
local description = Players:GetHumanoidDescriptionFromUserId(player.UserId)
humanoid:ApplyDescription(description)
for _, part in ipairs(character:GetChildren()) do
if part:IsA("BasePart") and part ~= rootPart and part ~= hitBox then
part.CollisionGroup = "CantCollide"
end
end
if humanoid.RigType == Enum.HumanoidRigType.R15 then
humanoid.HipHeight = 2
local rootMotor = lowerTorso:FindFirstChild("Root")
if rootMotor and rootMotor:IsA("Motor6D") then
local offset = Vector3.new(0, -humanoid.HipHeight, 0)
rootMotor.C1 = CFrame.new(offset)
end
hitBox.Size = Vector3.new(4, 2, 2)
rootPart.Size = Vector3.new(1, 2, 1)
end
humanoid.Died:Connect(function()
for _, part in ipairs(character:GetChildren()) do
if part:IsA("BasePart") then
part.CollisionGroup = "Default"
part.CanCollide = true
part.CanTouch = true
end
end
rootPart:Destroy()
hitBox:Destroy()
end)
end)
end)