If the player is nil, thats the same as explicitly saying set owner to nil.
Also it uses the Player Instance, rather than the Character. So there is no dying, only leaving the game.
This is getting very specific and its difficult to know exactly what you did. So I’ll show you my door. Apologies to those who are color blind.
[Reference A - Hinge]
Standard roblox HingeConstraint setup with an attachments in Hinge part and Door Mesh
[Reference B - NavModifiers]
- NavDoorway - a part with a
collision group
set to NavMesh,CanCollide
true, andPathfindingModifier
withPassthrough
false andLabel
set to DoorWay. This is necessary to create a division between rooms so thePathfindingService
will always use thelink
. - NavInside - a part with a
collision group
set to NavMesh,CanCollide
true, andPathfindingModifier
withPassthrough
true andLabel
set to DoorInside.Passthrough
is true this time so npc can walk through these parts. - NavOutside - a part with a
collision group
set to NavMesh,CanCollide
true, andPathfindingModifier
withPassthrough
true andLabel
set to DoorOutside.
[Reference C - Attachments]
- Door - actually
mesh
withcollision group
set to GeoDoor,CanCollide
true, andPathfindingModifier
withPassthrough
false andLabel
set to Door. This forces theNavMesh
to continue the block pathing based on the door’s position. So if its open it will go around. Also my GeoDoorcollision group
is set to collide with players and npcs. As opposed to NavMeshcollision group
which collides with nothing. - Prompt Attachment - used to make prompt appear on door knob
- NavInside/NavOutside Attachments - correspond to respective point for the
link
to use. - LinkDoor -
IsBidirectional
true,Label
set to Door
With a NavMesh
setup like this you can place this door between rooms and it will separate Room’s NavMeshes
. As you can see this room’s nav which is Labeled
as Small.
Code-wise when you set up your Humanoid.MoveToFinished
signal make sure to check the `waypoint.Action == Enum.PathWaypointAction.Custom and waypoint.Label == “Door”. If true do the open door action. Else continue like any other waypoint. Here is my src code but it may not be easy to use off the bat. There are many wrappers I create to make this modular and recursive-able. Enjoy!
Most excellent, I will review all the details. Thanks!
Hey, can I load pepe and have him do the same stuff on the client? Or must it be done on the server