I am making an Among Us-like game, and trying to make a chat system where it can get a Player’s UserId or Display name although the Output says it attempted to index nil… there is no way you can use a quote-unquote “GetProperty” function or whatever…
local Players = game:GetService('Players')
local player = Players.LocalPlayer
local Message = script.Parent
local DisplayName = Message.DisplayName
local Username = Message.Username
DisplayName.Text = player.DisplayName
Username.Text = '@' .. player.Name
it seems your trying to do something along the lines of player:GetProperty() which is a function that does not exist, unless its saying that for no reason which i wouldnt assume
all you have to do to get a players userid or display name is just to have a variable set to a player preferably to the event they join at aka game.Players.PlayerAdded:Connect(function(player)
then just do like player.UserId or player.DisplayName
and if you print one of those values, it will return it, but im assuming you want to do something else with it