Infinite yield possible

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I would like to be able to take the ChatServiceRunner

  2. What is the issue? Include screenshots / videos if possible!
    I get the following error Infinite yield possible on 'ServerScriptService:WaitForChild("ChatServiceRunner")'
    The code is the following:

local ServerScriptService = game:GetService('ServerScriptService')
local ChatService = require(ServerScriptService:WaitForChild('ChatServiceRunner'):WaitForChild('ChatService'))

local function onPlayerChatted(PlayerName)
	local Speaker = ChatService:GetSpeaker(PlayerName)
	local Player = game.Players:FindFirstChild(PlayerName)
	local Color = Player.BodyColors.TorsoColor3
	Speaker:SetExtraData('NameColor', Color3.fromRGB(Color.R, Color.G, Color.B))
end
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried searching around for a solution, sadly found nothing.

This means that the script waited for ”ChatServiceRunner” for as long as possible but it didn’t find it. Make sure there is actually that module script loading, and if it is then maybe you just have to make sure the script waits for longer, which you can do like this:

WaitForChild(“”,5)

There’s a time argument for WaitForChild so you can edit the max delay time.

I seems to keep on having problems

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