How to save a local script

Hello i made a store in my game, where you can buy abilities, like pushing people. The scripts enable, a local script for the player that bought the ability. But once he leave and rejoin, the local script do not enable back. I know it has something to do with database, but except saving value i dont know what to do.

1 Like

Can you show how you save the abilities?

1 Like

this is what i need i have nothing to save it the player can only buy it on the store then lose it by leaving

1 Like

I can help you that it’s so easy

1 Like

You must learn the basics of DataStore in order to do this because typing the entirety of the script here will be a type of “Spoonfed” as others say…

1 Like

I understand thank you for your response

1 Like

Open Roblox Studio:

Launch Roblox Studio on your computer.

Create or Open a Place:

Either create a new place or open an existing one where you want to add a local script.

Insert a LocalScript:

In the Explorer window, find the location where you want to insert the LocalScript.Right-click on the location and select Insert Object.Choose LocalScript from the menu.

Write Your Script:

Double-click on the LocalScript to open the code editor.Write or paste your script into the editor.

Save the Script:

Click on the File menu in the code editor.Select Save or use the shortcut (Ctrl + S on Windows or Command + S on Mac).

Name Your Script:

Choose a meaningful name for your LocalScript and click Save.

Save the Place:

It’s essential to save the entire place to ensure your changes, including the LocalScript, are saved.Click on the File menu in Roblox Studio.Select Save or Save As to save your place with the LocalScript.

1 Like

Sorry but i was talking about saving the state of a player local script into a database

1 Like