Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Player name getting (webhook)?

I'm making a game that when you complete it, it sends your username in a webhook (discord) message. It works so far, until I got to the finding player name part. It would always give me these bogus errors.

local module=script.MainModule
local sendMessage=require(module)
local webhook='NOT DISCLOSED, SORRY!'
		
	function Touched(self, Hit)
 		 if Hit and Hit.Parent and Hit.Parent:FindFirstChildOfClass'Humanoid' then
			local message=Hit.Parent.Name, ' has won Dark Hollows', self:GetFullName()
			sendMessage(webhook,message)
  end
end
		

I've tried endless methods, I can't seem to find any that work. Would appreciate if anyone could help me out.

I've tested removing the player name parts to see if the webhook works, and it does work.

Proof of above statement https://cdn.discordapp.com/attachments/471087717762072596/471377888424230923/unknown.png

Thanks!

9 comments

0

You know that discord blocks roblox requests..

0

Yeah, I would like to see how you have bypassed the blocking requests thing. I know its possible by running the request through your own website or something like that.

0

You don't, it's possible but it'll be blocked again by discord..

0

It works, folks. You saw it in the proof

0

But I would appreciate it if anyone could help me out!

0

To the guys talking about Discord blocking Roblox: Discord most likely unbanned Roblox because of RequestAsync now being a thing, allowing us to respect rate limits.

0

To OP: Can we please have the source of the script.MainModule that's referenced in this script? Also, please make changes to respect Discord rate limits if you haven't done that already.

0

I just simply need a way to put their name in front of "won Dark Hollows".

0

As others have said, it's not possible. It may have worked before, but the change was recent. They started blocking discord requests a little while after they began taking down discord codes themselves. It won't work anymore. Try something else like an external source coder.

1 answer

I found my own problem, thanks for all of your support... even though most of it was bogus trying to tell me what I was doing was impossible.

local module=script.MainModule
local sendMessage=require(module)
local webhook='NOT DISCLOSED'
	
function shutdown()
game.Players.ChildAdded:connect(function(h)
h:Kick('You have completed the Dark Hollows. Please allow up to 24 hours for a High Rank to promote you, do not ask and be patient!')
end)
for _,i in pairs (game.Players:GetChildren()) do
i:Kick('You have completed the Dark Hollows. Please allow up to 24 hours for a High Rank to promote you, do not ask and be patient!')
end
end	
			
deb=false 
script.Parent.Touched:connect(function(h) 
if(h.Parent:findFirstChild("Humanoid",true)~=nil)and(deb==false)then 
deb=true 
local message='Player: `' .. h.Parent.Name .. '` has won Dark Hollows'
sendMessage(webhook,message)
shutdown()
end
end)

I very much realize it's messy I don't know what happened when I pasted it but please excuse it.

Yes, I realize I changed up the message, I did some detail work so it would look nicer when I knew it was done.

If you need help with setting up your own webhook, please DM me at: Joey Deep#5455

This discussion is preserved as it was. New answers, comments, and votes are closed.