How to get a child

I cloned a humanoid model on WorldModel and I’m using it to play animation. The problem is, the world model is cloned for a player which joins, so obviously the name of the child is different every time. The code block down below works only for me, so I was wondering how to get a child, regardless of its name?

The game limit is 1 player, so there is no need to worry about multiple players.

local character = player.PlayerGui.ScreenGui.ViewportFrame.WorldModel:WaitForChild("OfficialDipsy")
1 Like

The characters name is set to Player.Name, you can just use that in your wait for child call.

You could also change the models name after cloning it to something generic like “Character”.

1 Like

Is the child the players name you assign it, since you have it as your username when waiting for child you could just do player.Name if that’s the issue.

local character = player.PlayerGui.ScreenGui.ViewportFrame.WorldModel:WaitForChild(player.Name)

Couldn’t you just Clone the character then Name it “dummy”

1 Like

I forgot about naming the model lol

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