I am getting this error “attempt to index nil with SetExtraData” in the developer console, how could I fix this?
This is because the speaker does not exist. I’m not really sure how the chat system works so I don’t really know how to fix it. You might be able to try replacing “player.Name” with just “player,” but it’s probably not the solution.
Can’t immediately see why the speaker does not exist, however there is a better method for parts of that script.
chatService.SpeakerAdded:Connect(function(speaker)
if rank == ... then -- what it currently is
end
end)
it fires when the speaker is added, which is better.
You may still need to have parts of that script in CharacterAppearanceLoaded or CharacterAdded so that the display name is changed.
