Server Script
remoteFunction.OnServerInvoke = function(player,tweenTime1)
tweenTime1 = 2
return tweenTime1
end
I'm using remote functions to set the values for my tween since i'm doing it on the client. The values i set in the local script won't replicate to the server. so i'm having a server script return the values. Problem is, the return doesn't work, i don't see what i'm doing wrong here but it doesn't return anything, instead the variable stays at nil.
Local Script
local tweenTime1 = nil
local evaluate = remoteFunction:InvokeServer(tweenTime1)
if evaluate then
print(tweenTime1)
end

3 comments
What if i wanted to put multiple variables into the paramater for InvokeServer(), and i want to return them all at once. Is there a way to do that, cause i don't want to use multiple remote functions just to return one number with each of them.
You can either return a table or a tuple
i'l try that thanks!