Hi, My problem is when I try to get the speaker it returns with this error: ServerScriptService.ChatServiceRunner.ChatService:169: attempt to index nil with 'lower'
My code:
plr.Chatted:connect(function(msg)
if string.lower(msg) == "/e rights" then
local ChatService = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local speaker = ChatService.GetSpeaker(string.lower(plr.Name))
speaker:SayMessage("TEST", "All")
end
end)
end)
I see a few things wrong with this code, if you can clarify or if this helps:
Is GetSpeaker a function or otherwise? I don’t recognize the method. If so, I don’t think you should be calling the player’s name as a string and keep it as the instance.
If you’ve copied a script from a built-in Roblox script, you shouldn’t have done that. What you’re trying to do should be achieved via a normal script.
Is GetSpeaker a function or otherwise? I don’t recognize the method. If so, I don’t think you should be calling the player’s name as a string and keep it as the instance.
Ive checked the api.
If you’ve copied a script from a built-in Roblox script, you shouldn’t have done that. What you’re trying to do should be achieved via a normal script.
I dont copy scripts.