local Event = game.ReplicatedStorage.BroadcastWinner
Event.OnClientEvent:Connect(function(Player, Amount, MapName)
game.StarterGui:SetCore("ChatMakeSystemMessage",{
Text = "[SYSTEM] "..Player.." won the obby race on the map "..MapName.." and recieved "..Amount.." Coins!";
Font = Enum.Font.SourceSansBold;
Color = Color3.fromRGB(239, 184, 56)
})
end)
✓ ANSWER ACCEPTED
attempt to concatenate Instance with string? at line 5
1 answer
✓ Accepted answer
local Event = game.ReplicatedStorage.BroadcastWinner
Event.OnClientEvent:Connect(function(Player, Amount, MapName)
game.StarterGui:SetCore("ChatMakeSystemMessage",{
Text = "[SYSTEM] "..Player.Name.." won the obby race on the map "..MapName.." and recieved "..Amount.." Coins!";
Font = Enum.Font.SourceSansBold;
Color = Color3.fromRGB(239, 184, 56)
})
end)
When you concantenate it does not automatically convert to string you should instead the player's names using Player.Name which is a string and would remove your error
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
Just tell me why since my server script is :
the fireclient thing is : game.ReplicatedStorage.BroadcastWinner:FireAllClients(player,player.Name,player.leaderstats.Rebirths.Value * 1000, script.Parent.Parent.Name)
I think you misunderstand how FireAllClients work you don't need to provide player like in fire FireClient so you could just use ell them it should be game.ReplicatedStorage.BroadcastWinner:FireAllClients(player.Name,player.leaderstats.Rebirths.Value * 1000, script.Parent.Parent.Name) and leave your other code as it was originally
:FireAllClients does not require a player instance as its first parameter, as you're firing to ALL clients, not just a single, individual player.
for some reason the fireallclients doesn do it to every player but only to one player