I have this chat, when the player types something and presses enter, it fires a remote event then that fires one back to the client making the player's chat show on the players gui. When it is fired and I do this script says the Player.Name is nil.
game.ReplicatedStorage.ServerStats.CustomChat.ChattedOut.OnClientEvent:connect(function(Player, Text)
if game.ReplicatedStorage.PlayerStats:FindFirstChild(game.Players.LocalPlayer.Name) and game.ReplicatedStorage.PlayerStats:FindFirstChild(game.Players.LocalPlayer.Name).BlockedList:FindFirstChild(Player.Name) == nil then
local Location = "N/A"
if game.ReplicatedStorage.PlayerStats:FindFirstChild(Player.Name) then
Location = game.ReplicatedStorage.PlayerStats:FindFirstChild(Player.Name).Location.Value
end

1 comment
It is a local script