Basically, I’m making an Chatbot that it can talk and I want it’s mouth to move when it’s talking but how do I detect how long it takes to say a text to tell the script when to stop moving the mouth.
You can use the number of characters in the string, and divide it by a multiple of 10 to get a timer for the mouth movement.
-- mouth movement starts
text = 'this is testing text'
task.wait(#Text / 10)
-- mouth movement stops
2 Likes
I’ll try it tomorrow.
I typically use this approach with a fixed offset, i.e;
task.wait(3 + #Text / 10) --Were '3' is the fixed offset.