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
The error is due to line 11, checking for equivalency is ==, assigning a value is =. I fixed your script but fairly certain this still wont work due to line 5, do you have a player named Stage? If this is a localscript get the LocalPlayer.
local ReplicatedStorage = game:GetService('ReplicatedStorage') local remoteEvent = ReplicatedStorage:WaitForChild('ShowPlayer') local players = game.Players.Stage 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 textColor = BrickColor.new('Lime green') if players.Value == 40 then remoteEvent.OnClientEvent:Connect(complete) end