I'm not any good with Remote Functions , neither Return, I'm making a building tool, and it sends a variable to the server containing the AssetId of the object to add and if it uses useAssetVersionId or not.
This is the Line in the Local Script
local root -- this is nothing rn
if useAssetVersionId then
Insert:InvokeServer(true, assetId)
else
Insert:InvokeServer(false, assetId)
end
Here is the server script:
local remotes = game:GetService("ReplicatedStorage")
local Insert = remotes:WaitForChild("Insert")
function onInsert(player,useAssetVersionId,assetId)
if useAssetVersionId == true then
local root = game:GetService("InsertService"):LoadAssetVersion(assetId)
return root
else
local root = game:GetService("InsertService"):LoadAsset(assetId)
return root
end
end
Insert.OnServerInvoke = onInsert
so basically I want the Remote Function to send back to client the defined version of the variable "root", but line 6 and 9 in the server script pretty much does nothing, any help would be very helpful
sorry for this question tho lol
