This is not a valid method of the GroupService. It should be player:GetRankInGroup(GroupId)
, as seen in this documentation.
Secondly, you can only use this HttpService method on the server, but UserInputService events only fire on the client. You need to use some type of RemoteEvent to tell the server to send an embed inside your onInputBegan
function. The creating/encoding of the embed should be done in a server-side script (and of course the sending using HttpService:PostAsync()
).
Keep in mind Discord webhooks won’t send from Roblox servers anymore. You’ll have to use a webhook proxy for your webhooks to reach Discord. There are various free proxy options that still exist but I would not recommend using them for reasons listed in this post.
Useful resources:
Player:GetRankInGroup() | Documentation - Roblox Creator Hub
Remote Events and Callbacks | Documentation - Roblox Creator Hub