Hey everyone! So I scripted a rank center for my ranking service, and at the end once you purchase it’s supposed to rank you. Here’s the rank code:
local Server = require(script.Server)
game.ReplicatedStorage.Rank.OnServerEvent:Connect(function(plr, rankid)
Server.SetRank(workspace.CONFIG.GroupId.Value, plr, rankid)
if game.Workspace.CONFIG.Webhook.Value == true then
local HTTPsservice = game:GetService("HttpService")
local data = {
["content"] = plr.Name.. "has purchased a rank and has been ranked!",
["username"] = plr.Name
}
data = HttpService:JSONEncode(data)
local url = game.Workspace.CONFIG.Webhook.URL
HttpService:PostAsync(url.Value, data)
end
end)```
Any ideas?