Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I get Left Arm in character for r6?

Asked by 5 years ago
Edited 5 years ago

So basically I have this unexpected error where it says

Left Arm is not a valid member of Model

I shouldn't have this error because I'm using r6 and I checked it it says Left Arm so I don't understand. I have the whole script if you need it comment but I find it reasonably not to post the whole script for this will waste space. My script...

LeftH = ctr["Left Arm"]
0
Most likely you might need to wait for it to be loaded.  User#19524 175 — 5y
0
really? HappyTimIsHim 652 — 5y
0
Try WaitForChild. User#19524 175 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Sometimes there is latency when instances are streamed to the client. I'm assuming you're getting the character from CharacterAdded, which will fire before the character's model is populated with limb parts and other required instances.

If you're sure that an instance bearing this name will eventually exist as a child, you can use the WaitForChild() method inherited by all instances.

LeftH = ctr:WaitForChild("Left Arm")

This will yield the current scope, so you should only use this method when you're absolutely certain that the child will exist at some point in time.

Ad

Answer this question