If you make a power/skill shop what do you guys do?
After the player buying the skill/power,do you clone the scripts and parent it to the player?
Or do you a make folder, with all the necessary objects inside (e.g: RemoteEvents,Scripts,Localscripts, etc) and then clone that folder somewhere else?
Idk if this belongs in here like “Scripting Support” but i feel id make a speed potion or sandwich or something i have no idea how to make something like that though
If they are Local Scripts with UserInputService, I’d put all of those in the player’s backpack. If it’s a tool just put it in the player’s character or the player’s backpack too.
If your skill uses multiple key objects (such as remote events), I’d put the folder in the player’s backpack but keep the main script that triggers the player input in the backpack alone.
Hmmm, That’s a pretty neat way to do, But how about a local script that acts as a keybind and and a main script that catches the OnServerEvent sent by the remote fired by local script?
Do you still parent It inside the Backpack and group every thing together?
I’d put the Server Script that uses “OnServerEvent” in ServerScriptService, this way the Client (exploiters) has no way to access it except if they go through the Remote Event.
I don’t clone or create anything personally. I take a purely data-oriented approach – if the player purchases a powerup then I attach it to their active character’s data (a table indicating what powerups they have active) and then during gameplay my systems will just act accordingly based on what’s there. Some systems may apply powerups passively on spawn while others are applied when certain actions are triggered (e.g. attacking).