So I want a chat message to show in chat when a player reaches a certain leaderstats value (which is already working) but the issue is that I want the chat message to have the player’s name followed by “has beaten Easy!” I got that working but the chat message shows the players name who is on the client. (Thats prob too confusing pretty much its not showing the person who got to stage 31’s name its showing the name of yourself if that makes any sense) The scripts are below.
-- localscript
game.ReplicatedStoreage.SendEasyMessage.OnClientEvent:Connect(function(PlayerName)
game.StarterGui:SetCore()(“ChatMakeSystemMessage”, {Text = game.Players.LocalPlayer.Name..” has beaten Easy!”, Color = Color3.fromRGB(0, 255, 0), Font = Enum.Font.FredokaOne})
end)
-- server script
game.Players.PlayerAdded:Connect(function(Player)
local stats = Player:WaitForChild(“leaderstats”)
local stage = stats:WaitForChild(“Stage”)
stage.Changed:Connect(function(NewValue)
if NewValue == 31 then
game.ReplicatedStorage.SendEasyMessage:FireAllClients(Player.Name)
end
end)
end)
-- there is a remote event in replicated storage btw