local url = "" --webhook link-- local http = game:GetService("HttpService") local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:Connect(function(player) local data = { ['embeds'] = {{ ['title'] = "Button clicked", ['description'] = player.Name .. " has clicked the button", ['url'] = "https://www.roblox.com/users/".. player.UserId .. "/profile" }} } local finaldata = http:JSONEncode(data) http:PostAsync(url, finaldata) end)
Edit: My Error
MouseButton1Click cannot get the player as far as I know. Try using a LocalScript, Script, and RemoteEvent, because RemoteEvents automatically pass the player object as the first parameter.
Edit: Because it's in the gui, you could script.Parent.Parent, etc. to get the player's name.