If a player stands under an npc, then the npc stands on the player’s head because of hip height

robloxapp-20240712-1958036.wmv (848.8 KB)
is there a way to avoid that, so like player can go under npc and nothing happens? or i have to make some custom npc system without humanoid or whatever?

#help-and-feedback:building-support might have something for you there.

literally nothing there, i think im the first to even ask that question

Apologies for my phrasing, i just meant you should move your post, as builders might have a solution for you.

oh, well i did so i just have to try something myself until someone replies then, thanks

1 Like

if someone is stupid like me then heres what i added into serverscriptservice:

local Players = game:GetService("Players")
local PhysicsService = game:GetService("PhysicsService")

local GroupName = "Entities"
PhysicsService:RegisterCollisionGroup(GroupName)
PhysicsService:CollisionGroupSetCollidable(GroupName, GroupName, false)

local function ChangeGroup(part)
    if part:IsA("BasePart") then
        part.CollisionGroup = GroupName
    end
end

local function HandleCharacterAdded(character)
    for _, part in ipairs(character:GetDescendants()) do
        ChangeGroup(part)
    end
end

Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        HandleCharacterAdded(character)

        character.ChildAdded:Connect(function(object)
            ChangeGroup(object)
        end)
    end)
end)

HandleCharacterAdded(workspace.npc) --npc here
1 Like

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