Hey, devfourm. I hope everyone is having a good day. Now let’s get down to business. I’m making a game to thank star creators and allow people to hang out and thank them as well. I decided to make a webhook that lets me know if anyone in the star program has joined & I was wondering if someone could tell me why my script isn’t working?
Script
local Group = 4199740
local Minimum = 1
game:GetService("Players").PlayerAdded:Connect(function(Player)
if Player:GetRankInGroup(Group) >= Minimum or Player.UserId == 1384638214 then
local ReplicatedEvent = game:GetService("ReplicatedStorage").PlayerJoinEvent
local ThankGUI = script.ThankStarCreator:Clone()
local Webhook = "https://discord.com/api/webhooks/804193151056609321/k0JydKQFaEzEwzyJBCkwNbHu9z3-BuHgiHa2iFTzdMU-_UkvZpze1EF9NLKG7r64BoPp"
local HTTPService = game:GetService("HttpService")
local PlayerUserId = Player.UserId
local data = {
['embeds'] = {{
['title'] = "**STAR CREATOR JOINED**",
['description'] = Player.Name.." has joined your game!",
['image'] = game:GetService("Players"):GetUserThumbnailAsync(PlayerUserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420),
['url'] = "https://www.roblox.com/users/".. PlayerUserId .. "/profile"
}}
}
ReplicatedEvent:FireAllClients(Player.Name, Player.UserId)
ThankGUI.Parent = Player.PlayerGui
local FinalData = HTTPService:JSONEncode(data)
HTTPService:PostAsync(Webhook, FinalData)
end
end)
–
ERROR
I hope you can help. Thanks.