Messaging Service API Link

It now sends status code 200, but nothing happens in game with this function:

messageservice:SubscribeAsync("Kick", function(data)
	local kickNameReason = data.Data;
	kickNameReason = string.split(kickNameReason, ":::");
	print(data)
	if game.Players:FindFirstChild(kickNameReason[1]) then
		local player = game.Players:FindFirstChild(kickNameReason[1]);
		player:Kick(kickNameReason[2]);
	end
end)

type: ‘default’,
url: ‘https://apis.roblox.com/messaging-service/v1/universes/4313843182/topics/Kick’,
status: 200,
statusText: ‘OK’,

1 Like

Fixed, figured out you can’t use this in studio. :facepalm:

1 Like

Yea it does not work in-studio (I think that it is cuz it fires to all Roblox servers and when you test in-studio it is locally ran or something like that). Don’t worry your not the first one who has made that mistake, other people have asked me the exact same thing and it was cuz they where in-studio.

Ah okay, I’m quite new to this API stuff. The most I have is a integration to ban people from outside of ROBLOX, and check my database. However, I’ve never actually sent to roblox before so it’s weird haha. Thanks alot for your help!!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.