I was working on a system and I need a RemoteFunction to get a datastore to return to a GUI. Though while using it I found out it was not even Invoking the Server. The codes I have are below.
Server:
--------------
-- Services --
--------------
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Datstore = game:GetService("DataStoreService")
local Warrant = Datstore:GetDataStore("PlayerWarrant")
function GetRes.OnServerInvoke(from, suspect)
local suspectID = game:GetService("Players"):GetUserIdFromNameAsync(suspect)
local INFO = Warrant:GetAsync(suspectID) or {User = suspectID, Status = false, Reason = ""}
return INFO
end
Client:
--------------
-- Services --
--------------
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
-- Check Warrant Button --
CheckButton.MouseButton1Down:Connect(function()
local result = GetRes:InvokeServer(tostring(CheckUser.Text))
local playername = Players:GetNameFromUserIdAsync(result.User)
User.Text = playername
end)
Please help me.

2 comments
You'll need to return in your callback function.
I did that in my script. But I forgot to put it on here one second