BanAsync() can only be called on the server Error

Hey, so I’ve been working on a plugin for a long time and I got this error:
BanAsync() can only be called on the server

It is a server script
image

Script:

local config: BanConfigType = {
		UserIds = {2758548757},
		Duration = 500,
		DisplayReason = 'test',
		PrivateReason = 'test2',
		ExcludeAltAccounts = false,
		ApplyToUniverse = true
	}

	local success, err = pcall(function()
		return Players:BanAsync(config)
	end)

if success then
    print(success
else
  warn(err)
end

A plugin script is different from a server script. They have different execution contexts. It probably means you cannot use :BanAsync() in plugins.

How are there datastore plugins? I have a plugin which shows me all datastores in my game and all of the keys, and this can only be done from the server.

There are loads of plugins which do things that cant be done on the client, so surely this can be done on the client

I hope a roblox staff member sees this to confirm it

Most datastore plugins make the script and put it in a place like ServerScriptService in your game.