#What are the proper practices to using bindable functions in a game?
1 messages · Page 1 of 1 (latest)
What do you want to do exactly that u need to use them?
im trying to use them for events for picking up items, generating the map, etc
And i need to ensure players cannot do that
I mean u could use remote events instead to be safe
Also why'd you need a bendable event for picking up items and generating a map
i need server scripts to communicate with eachother
as opposed to client scripts
also the pick up mechanic isnt really player based
so i cant rely on using client scripts
If you use a bindable function and a server script fires it, clients can't see or manipulate it. Same with the other side, server cannot see what the client does with that bindable function
ohh so as long as i dont use it on the client its perfectly safe?
Yes and even if you do use it on the client the server can't even see that request
omg tysm this is huge to me!!!
Np
is there an actual use for bindable events/functions just kinda just seems like a bandaid fix for bad script architecture?
its to let the same run context scripts know when to do something
I kinda use for my sliding mechanism where I want physics to be done on the client, it could also be used to time things properly
ofcourse with small delays
but its better than just guessin
would you not just use module scripts tho?
you need to communicate between the server and the client, neither the client or server can access eachother bindable functions
maybe im missing something
also they are unsafe they can be used to ddos your game
so you need to have ddos protections
suphi module has like built in ddos protection, so I use that when I need infromation from the client, within like a deadline
which
packet?
ddos would just apply to remote event/fucntions no?
yup packet
oh wait remote functions mb
I confused the two
but ye,
yea I understand remote functions thats fine but bindabale functions I dunno bro
nah bindable functions are kinda useless 😭
like with modules you:
1.dont need to set uo listeners
2.dont need to use instances in ur explorer
3. cleaner flow of code
yea like im not sure why people use bindable events/functions
though tbh, sometimes you need to listen to events using bindable remotes and functions like the use case is really specific
sometimes it'll be much more cleaner to just use a bindable remote/ funciton
or less of a hassle
i started hating packet when something errors when it shouldnt error lmao 😭
something with boolean
i forget
ik what you mean, but once you get the hand of it its pretty easy to use
yea the only use case I think of is that you already made a system but you dont want to confgure it so it plays well with other scripts so you just use a bindable event as a bandaid fix....
you might also use it in OOP, when you want to create a new yk custom property
and you want listeners for it
but then signal modules are just much better for that ngl
yea fair
tbh after singal modules I literally only used bindable event just once and it was a bandaid fix as you said
signal are just more cleaner and are gc'ed automatically
and faster too
with bindable remotes however you are going to have to manually delete them, destroy their connections etc
which is a huge hassle ngl, even if you use a maid
isnt maid kinda oldschool tho
i use trove
I'm not sure, maid does a fine job for me so I didn't look for other alternatives
speaking of trove when you clean up a table using trove i assume you still have to set it to nil after you have called its destroy function right? only just started using trove
but all maid modules just do is destroy things
whether its connections
objects
etc
Well I've never used it but you could do those already pretty easily I think