Weird script error

I keep on getting this one error:

21:08:42.391 - Players.bootsareme.PlayerGui.AdminConsole.AdminScript:6: attempt to call a Instance value

Here is my localscript:


script.Parent.Frame.BAN_BUTTON.Activated:Connect(function()
	game.ReplicatedStorage.BanPlayer(tostring(script.Parent.Frame.ENTER_USERNAME.Text)) --Error happens here
end)

Here is my server script:

game.ReplicatedStorage.BanPlayer.OnServerEvent:Connect(function(player, username)
	local abuser = game.Players:GetUserIdFromNameAsync(username.Name)
	BanDataStore:SetAsync(abuser, true)
	print("Banned" .. username.Name)
end)

I tried tostring() but it did not do anything useful.

ENTER_USERNAME is already a string.
You should also wrap your calls in a pcall.
Such as: SetAsync & GetUserIdFromNameAsync.

Also, here’ how you should do it:

local abuser = game:GetService('Players'):GetUserIdFromNameAsync(tonumber(username))

Instance is not a function.
Add :FireServer between game.ReplicatedStorage.BanPlayer and (tostring((script.Parent.Frame.ENTER_USERNAME.Text))and it should work.