#Remote Function in Remote function or alternative

1 messages · Page 1 of 1 (latest)

warm gate
#

So im new to using Remote functions as I usually just use events, but I thought it would be alot more efficient to use remote functions for creating a phone calling system, the same way Da Hood does it. I was wondering how I would script a way to a player requesting to call someone, then the reciever accepting or denying the call, and I thought: "What if I put a remote function for the sender to send the request, and the server sending a remote function to the reciever checking if they accepted or denyed the call and return it all back to the sender"... Although I'm not sure if it can work or if there is a better way of tackling this issue... I appreciate any help!
:)

polar ridge
#

https://devforum.roblox.com/t/what-event-is-used-for-client-to-client/1562651

According to this post, to achieve client-client communication you will have to go through client->server->client

#

I'd use a remotevent to send the call request to the server, and from the server a remotefunction to the designated player

warm gate
#

Ah

#

So a remote function cant wait for a value to be returned?

polar ridge
#

Actually I'd use a remote function for both

warm gate
#

Cause I was thinking of using 2 remote functions, from client to server to client

#

Thats what I was trying to do but I'm not sure how I would do it

#

I was thinking Client 1 sends remote function1

#

Server recieves remote function 1 and sends remote function 2 to client 2

polar ridge
warm gate
#

Then recieves info from remote function 2 to send back to client 1 through remote function 1

polar ridge
warm gate
#

Yeah me too

#

But is it possible to fire a remote function in a remote function?

warm gate
#

So one remote function is to send the request through a server script, and the server script sends another remote function in that same .OnServerInvoke to check if the other client accepts or not

#

It's kinda hard to explain lol

#

But I think what you drew is what I'm trying to say

polar ridge
#

Ye it's possible

warm gate
#

Oh okay! Thanks :)

#

Gonna try it out later today

#

and post it here once it works >:D

#

After this I gotta work on 2 more apps on the phone in my game then im done working on the phone...

#

Ui scripting is like working with spaghetti...

#

:WaitForChild() this... :WaitForChild() that...

polar ridge
#

I hate working with UI

#

Designing them takes a lot of time

warm gate
#

yep...