I got this error and I don't know what I did wrong. I searched the error up online and got no results. I've also tried removing ends and adding ends. I need help, thanks.
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local remoteEvent = ReplicatedStorage:WaitForChild('ShowPlayer')
local players = game.Players.Stage
textColor = BrickColor.new('Lime green')
if players.Value = 40 then
local function complete(playerName, partName)
game.StarterGui:SetCore('ChatMakeSystemMessage', {
Text = playerName..' completed '..partName;
Font = Enum.Font.SourceSansBold;
Color = textColor.Color;
FontSize = Enum.FontSize.Size24;
})
end
remoteEvent.OnClientEvent:Connect(complete)
end

2 comments
i made a mistake in line 5 its supposed to be
local players = game.Players.leaderstats.Stage