I have a coding system that is part of a fighting game where a serverscript inside a tool checks the nearby area for characters to damage, then calls a bindable function for a serverscriptservice script as it proceeds to check whether or not the characters nearby are parrying. Then, if so, calls a function in the original players tool to play a parried animation, stun, and remove blood from the player.
However, bindable events cannot be fired for a specific character, and as such I have no effective way to communicate back to the clients tool that they have been parried.
How can I use Bindable events, or something of the sort, to call a function in a specific server-side script as effectively, and efficiently, as possible?
use arguments. you can sent data through things like remoteevents and bindables right? you can send whatever information you need to be recieved and handled. i hope this answers your question
I have already done that, I was hoping to know how to send information or call a function from the server script service to a client’s tool, which has a server-side script inside of it.
im pretty sure that information is around. I think its called a bindable. But if you dont want to use bindables, just make a makeshift system.
I used to hate bindables, so what i did is when i wanted to send info from one serverscipt to another, i would use value objects. First, i would create a folder somewhere detecated for this, then in script 1, to send information, i would create a new String value or something and set the value to whatever information i want to pass over, then set the parent to the folder. ANd in script 2, ill just have a while loop, it could even be in a coroutine.wrap()() so other stuff can run at the same time, and it will constantly check for a new object in the folder.
so its like this
script 2 constantly checks FOLDER for new String value.
script 1 creates new String value and sets value to “hello world” and puts it in FOLDER.
script 2 immediately sees a new String value in FOLDER so it reads its value
now script 2 knows the information. the value will be “hello world”, then it can store than value and/or run a function with it and then it can even :Destroy() the value when its done.
I already use bindable events or functions. What i’ve been asking for is a way to communicate serverscripts with another serverscript, but a specific, singular one.
Invoke() invokes all scripts that contains an onInvoke() function, other than the envoker, which is why it is usefull for invoking a script in serverscriptservice. However, it’s because of this that it fails to invoke to a specific tool, client, serverscript, etc. I was hoping to find out a way to Invoke a serverscript for one person’s tool, not everybodys tools, just one. They all have the same scripts, but i want to fire for one.