So, i was doing a discord connector. About chat, then everything goes fine with remote event. Exept that the remote event must recieve: Name, Msg, name is fine but Msg comes the same as the name. Here the scripts. I will block discord id for obvious reasons.
In LocalScript
plr = game.Players.LocalPlayer
plr.Chatted:connect(function(msg)
game.ReplicatedStorage.RemoteEvent:FireServer(plr.Name, msg)
print(msg)
end)
/\
In here it prints the msg of the player like it should.
game.ReplicatedStorage.RemoteEvent.OnServerEvent:connect(function(name, msg)
local HTTPService = game:GetService("HttpService")
local url = "Blank text"
name = tostring(name)
print(msg)
local Data = {
["username"] = "[In-Game] "..name.."";
["content"] = "***"..msg.."***";
}
Data = HTTPService:JSONEncode(Data)
HTTPService:PostAsync(url, Data)
end)
In here it prints the same as username. Any fix? Thx.

1 comment
Use player instead of name, and use player.Name instead of tostring