Issue with Remote Events

Here is my code:

[Local Script inside StarterPlayerScripts:]

local RemoteEvent = game.ReplicatedStorage:WaitForChild("ExploitAlert")

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
repeat wait() until LocalPlayer.Character

while true do
	wait()
	if LocalPlayer.Character.Humanoid.WalkSpeed > 24 then
		RemoteEvent:FireServer("speed")
		LocalPlayer:Kick("Please turn off your exploits before joining back!")
		wait(10)
	end
end

[Server Script inside ServerScriptService:]

local RemoteEvent = game.ReplicatedStorage:WaitForChild("ExploitAlert")

local url = "[REDACTED]"
local HttpService = game:GetService("HttpService")

RemoteEvent.OnServerEvent:Connect(function(player, Type)
	print(1)
	if Type == "speed" then
		print(2)
		local data = 
			{
				--["content"] = "",
				["embeds"] = {{
					["title"] = "Possible Exploiter",
					["url"] = "https://www.roblox.com/users/" .. player.UserId .. "/profile",
					["description"] = "A user has been caught with possible exploits!",
					--["thumbnail"] = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username=" .. player.Name,
					["type"] = "rich",
					["color"] = tonumber(15927047),
					--["timestamp"] = true,
					["fields"] = {
						{
							["name"] = "Alert Type:",
							["value"] = "Speed Hacks (" .. player.Character.Humanoid.WalkSpeed .. ")"
						},
						{
							["name"] = "Player:",
							["value"] = player.Name
						}
					}
				}}
			}
		
		HttpService:PostAsync(url, HttpService:JSONEncode(data))
	end
end)

The remote event fires from the client but the server doesn’t seem to be receiving it and there are no errors in the output. Any help at all would be appreciated!

1 Like

Have you tried adding some prints on the client side to see if the remote is being fired?

1 Like

Yes, and it kicks the user if exploits are detected. It prints that the remote event is definitely sent.

What about printing on the server side here

to see if the event has been connected?

Yes, it gets printed but the remote event doesn’t fire.