Okay, so I am trying to send a http request when a button is clicked which works.. but I want it to display the username of the person that clicked the button. Is that possible? If not, is there a way of getting round it?

Here is my code:

local RadioFrame = script.Parent.RadioFrame
local PanicButton = RadioFrame.PanicButton
local RadioRemoteEvents = game.ReplicatedStorage.RadioRemoteEvents
local RadioEvent = RadioRemoteEvents.RadioEvent

PanicButton.MouseButton1Click:connect(function(Player)
    local http = game:GetService("HttpService")

    local data = {
            ["content"] = Player
        }
        
        local newdata = http:JSONEncode(data)
        http:PostAsync(linkHere,newdata)
end)

4 comments

0

["content"] = Player.Name though I would use UserId over the players name

0

Wait, my updated code is:

0

Wait nevermind. Anyway, please can you explain what you mean? Someone suggested using remote events but idk what they mean by that.