Client apparently cannot detect body parts

Greetings scripters,

I am trying to put a ProximityPrompt inside a HumanoidRootPart, and this is done in the client.

This is not working, as it is saying HumanoidRootPart is not a valid member of model.

So I printed every single child the script could find inside the character, and no body parts showed up.

This is weird, as it has never happened before until now. I would like to know if this is supposed to happen and I should do it in the server or if it’s a serious bug. Thanks.

Does the Local Script run right when the game starts?

Yes it does. Putting a wait(1) at the beginning of the script somehow worked. Thanks, lol.

1 Like

Glad you found a solution, however, I would recommend using a CharacterAdded and then connecting a CharacterAppearanceLoaded to that.

1 Like

you may be running the script before the player’s character has loaded in. You can put a wait in your script to run after the player is loaded like this

local player = game:Getservice("Players").LocalPlayer
player.CharacterAdded:Wait()
1 Like

@dukzae @motlopoway This is not a player’s character just so you know.

Are you making interactable npcs for your game?

1 Like

Then a basic wait() should work.

just a wait at the beginning of the script?

Also I’ve been messing around while waiting for answers and it seems that sometimes the explorer shows no body parts.

I’ve tried repeat wait() until v.HumanoidRootPart and that somehow messes up stuff more.

Try

:WaitForChild(“HumanoidRootPart”)

1 Like

Update: Apparently it can do two right when the game loads in, then it will do the rest after a minute or so.

Everything in the script is working ok!

EDIT: This is because of streaming enabled. The parts aren’t loaded in yet so it doesn’t find it.