This is the script i put in codeCallback
Cuz my remotefunction is called UseCode
Your remotefunction has to be replicatedstorage.Function.UseCode
or else it will never receive the remotefunction
You should read this article:
Remote Events and Callbacks | Documentation - Roblox Creator Hub
No…
local replicatedstorage = game:GetService("ReplicatedStorage")
local function yourRemoteFunction(data)
local result = data * 2
return result
end
local remoteFunction = replicatedstorage.Function.UseCode
remoteFunction.OnServerInvoke = function(player, data)
return yourRemoteFunction(data)
end