Fixed! Thank you youtube master wow, I had to put a modification at the end to make it not glitch out and be weird, thank you!
while true do wait() if game.Workspace.NPC.Head.speach.PlaybackLoudness <= 65 then game.Workspace.NPC.Head.Mouth.Texture = "rbxassetid://2801767831" elseif game.Workspace.NPC.Head.speach.PlaybackLoudness <= 75 and game.Workspace.NPC.Head.speach.PlaybackLoudness > 65 then game.Workspace.NPC.Head.Mouth.Texture = "rbxassetid://2801751501" elseif game.Workspace.NPC.Head.speach.PlaybackLoudness <= 85 and game.Workspace.NPC.Head.speach.PlaybackLoudness > 75 then game.Workspace.NPC.Head.Mouth.Texture = "rbxassetid://845217767" elseif game.Workspace.NPC.Head.speach.PlaybackLoudness <= 95 and game.Workspace.NPC.Head.speach.PlaybackLoudness > 85 or game.Workspace.NPC.Head.speach.PlaybackLoudness > 75 then game.Workspace.NPC.Head.Mouth.Texture = "rbxassetid://907601394" end end
Hello. The problem is that you wrote <=
which means less than or equal to. This would not work as 75, 85, and 95 are greater than 65. Try adding a simple and statement that checks if it's louder than the other if statements.
while true do wait() if script.Parent.speach.PlaybackLoudness <= 65 then script.Parent.Mouth.Texture = "rbxassetid://2801767831" elseif script.Parent.speach.PlaybackLoudness <= 75 and script.Parent.speach.PlaybackLoudness > 65 then script.Parent.Mouth.Texture = "rbxassetid://2801751501" elseif script.Parent.speach.PlaybackLoudness <= 85 and script.Parent.speach.PlaybackLoudness > 75 then script.Parent.Mouth.Texture = "rbxassetid://845217767" elseif script.Parent.speach.PlaybackLoudness <= 95 and script.Parent.speach.PlaybackLoudness > 85 then script.Parent.Mouth.Texture = "rbxassetid://907601394" end end
Please accept and upvote this answer if it helped.