So like I need to create a script to take items out of an inventory and clone a block and change the position using mouse movements and mouse.hit.position
a lot of work.
But I figured I need a RemoteFunction based off of what the wiki says because I want to send variable arguments from the client to the server and change some of those arguments in the server script and then send them back into the client.
I really don't know how RemoteFunctions work. I looked at the wiki about it and found about InvokeServer and InvokeClient and OnServerInvoke
I figured it would work like this
-- local script
local remotefunction = wherever.it.is
--<code, functions, if statements, variables>
remotefunction:InvokeServer(Variable1, Variable2)
then we go to a server script
--server script
local remotefunction = wherever.it.is
remotefunction.OnServerInvoked = function(Variable1, Variable2)
if Variable1 = false
then
end
end
Basically, how do you send variables over with InvokeServer and OnServerInvoked.
All I need is a small and simple example. My brain is big but not big enough to understand the small example on the wiki

1 comment
Yes you can send variables through remote functions. Also it is OnServerInvoke, not OnServerInvoked