Why does my code doesn't work?

Why this code doesn’t work?



it prints if I delete

CS.SpeakerAdded:Connect(function(name)
				local SDude = CS:GetSpeaker(name)
				SDude:SetExtraData("Tags", {{TagText = "Donor", TagColor = Color3.fromRGB(47, 255, 0)}})
			end)

help plz

Do you get any errors in the Output window?

Try using the debugger to step through the code one line at a time to see if the expected control flow is followed, and use the variable inspection window to see if all the variables have the expected values.

no errors in output…:pensive::pensive::pensive::pensive: Do you have any other solutions?

Yeah, try the debugger like I suggested. That’s how I would go about it, but I can’t really do it for you sorry.

I don’t see how adding or removing the SpeakerAdded connection should prevent the print statement from running, and I don’t know what ChatService is or how to use it. Is it a 3rd party module?

CS.SpeakerAdded:Connect(function(name)
    if MS:UserOwnsGamePassAsync(plr.UserId, GamepassID) then
       local SDude = CS:GetSpeaker(name)
	   SDude:SetExtraData("Tags", {{TagText = "Donor", TagColor = Color3.fromRGB(47, 255, 0)}})
   end
end)

can you send the code so I can find the broken part?