How to send a server message when the number is higher than 0.5

I made a scale(a part) that measures your weight and a text that is written on the scale(part), i want to make that when the player weight is over 0.5 it sends a server message saying the players name and the text that i have written next to it. Here is a picture:

Probably you need change the player value,

local player = game.Players:FindFirstChildWhichIsA("Player").Name

instead:

local player = game.Players:FindFirstAncestorWhichIsA("Humanoid").Parent.Name

and after of the ‘chat’ function you need call the function using the ‘messages’ value as parameter, like this:

local messages = (player.."is fat HAHHAHHA")
chat(messages)

Is this a local script? Chat messages to my knowledge can only be sent locally

If this is a server script it will not work.
Reason is because game.StarterGui:SetCore("ChatMakeSystemMessage") only works on the client
I suggest making a remote and firing all clients then make that message on a local script