Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

(Answered) Why am I receiving "lower is not a valid member of Player" from chat tags?

I keep receiving "lower is not a valid member of Player 'Players.ChirpPerson'" from the following script located in ServerScriptService:

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

local giveTag = game.ReplicatedStorage.GiveTag

giveTag.OnServerEvent:Connect(function(player)
	local speaker = ChatService:GetSpeaker(player)
	
	local DefaultTags = {
		{TagText = "FirstTag", TagColor = Color3.new(0,0,1)},
		{TagText = "SecondTag", TagColor = Color3.new(1,0,0)},
	}
	if speaker and speaker:GetPlayer() then
		speaker:SetExtraData("Tags", DefaultTags)
	end
end)

I don't know what could be wrong, any help is appreciated!

2 comments

1

The parameter for GetSpeaker should be a string, do player.Name

0

@Spjureeedd THANK YOU SO MUCH IT WORKED!

1 answer

It was fixed courtesy of @Spjureeedd who suggested that the parameter for GetSpeaker should be a string by putting in "player.Name" instead of just "player." :)

This discussion is preserved as it was. New answers, comments, and votes are closed.