UserInputService doesn't work

  1. What do you want to achieve? Keep it simple and clear!

I want an admin panel to open when the admin presses backslash.

  1. What is the issue? Include screenshots / videos if possible!

The issue is that nothing even happens. No prints, no errors, nothing.

Code

inputService.InputBegan:Connect(function(input, admin)
	if table.find(adminIDs, admin.UserId) then
		if input.KeyCode == Enum.KeyCode.BackSlash then
			if debounce == false then
				debounce = true
				local GUI = script.AdminGui:Clone()
				GUI.Parent = admin.PlayerGui
				print(admin.Name.." has opened the admin panel!")
				wait(5)
				debounce = false
			end
		end
	end
end)

The script is a server script inside server script service. Debounce is defined at the top of the script (not shown). What am I doing wrong?

Local scripts can’t be in server scripts service, and if it’s a server script, you need to use UserInputService in a local script.

Would the local script be placed inside StarterPlayerScripts? (OnClientEvent)

Correct, that would work great.