Server Script
local remotefunction = game.ReplicatedStorage.RemoteFunction
local ServerStorage = game.ServerStorage
remotefunction.OnServerInvoke = function()
for i,v in pairs(game.ServerStorage:GetChildren()) do
return v.Name -- should return a table
end
end
Local Script
local remotefunction = game.ReplicatedStorage.RemoteFunction
local ValuesGot = remotefunction:InvokeServer()
print(ValuesGot)-- Only prints one intvalue
print(unpack(ValuesGot)) --Should be a table but it errors saying its a string
The local script should Return the name of the int values which should return the names of 3 intvalues in server storage but its only returning 1

1 comment
The reason only one value is being returned is because when you use return, it ends the loop. Consider creating a table beforehand and using table.insert.