Hey, so I wanted to ask if there are any alternative methods of client to server communication. I will use remoteevents, however for security purposes, I do not want to spawn the players character (avatar) until they decide to choose a fighter. Hence, I want to only spawn them when they choose a fighter.
Now, this brings up 2 problems I need to tackle.
StarterGUI doesn’t get cloned when the players character is not spawned, I already tackled this by cloning the guis to players from ServerStorage.
Unspawned players cannot fire remotes, and that’s a bigger issue, I need to have the client to communicate with the server atleast a bit so that the server knows when and what to spawn the player as. Now, I have been told by an individual that I can somehow use values to communicate with the server a bit but I have no idea how to do that and cannot ask them. Any ideas?
I think the individual meant valuebased objects. Basically these objects are instances that can store values. Try go to anything in the explorer, click the + button and search up “value”
If u made a value Instance for example a boolean value, so the value can either be true or false,
you could change the value to true in a script, and in another script, you could do a value changed event. In this case, the other script will check the boolvalue if its true or false. Then you can do “if true then” there.
If I am wrong, I would be glad if someone could correct me.
i believe the one that changes the value will be the player, so that would not be possible because changes made by the player only show on the player, if changed by the server, everyone would see it
Original poster asks for client to server communication, such communication can’t be transferred by just changing value objects as it hasn’t in any way been communicated.
I’m not against them, I intend to use them but not in the main menu, as I do not want to spawn the players avatar for security until they choose a fighter. And how do I know? Well, let’s just say I have a couple exploiters for friends.
The only way you can really prevent people sending bad data is to check the data on server level and having it go through preferably several if conditions checking different things.
For example
Has the game started yet?
Is it too late to spawn a fighter?
Are they already a fighter?
Are they already alive?
There’s surely more you could think of, but if you’re about to say there’s no conditions that need to be checked, then it sounds like the idea spawning a fighter through exploits in the first place is just another way to play the game.
You don’t need to spawn the player to fire remote events / functions. If your system it built to work like that then you need to change it. It’s counterintuitive to lock network access to when you have a player spawned.
Your system should be in full control over your game, otherwise you’ll encounter vulnerabilities. If you cannot perform an action due to the system of your game, then it makes sense to change up how your system operates than to patch around the initial problem.
They do not, feel free to try for yourself, I remember being told this by someone a while ago and just tested it by making a script to fire a remote and the remote should print, it works when I spawn the character but when I don’t it doesn’t.