How to access the database with other scripts?

Hi guys, I have a database in ServerScript Service with all the information I use in the game and it works fine, and I don’t use leaderboard.

What I need to do is have access to the database to display the coins in a TextLabel. But I don’t know how to access a Database in the GUI to the Database in ServerScriptService.

I tried BindableFunction but it didn’t work

You can either use a RemoteFunction which the client can use to ask the server for the data or you keep a live copy of the data in ReplicatedStorage. A BindableFunction (What you used) only works from Client to Client or Server to Server, while a RemoteFunction works Client to Server and Server to Client.

Hello.
You need to learn about filtering enabled and client - server architecture.
I would suggest using a remote event to give the client the information.
To learn more about remote events and functions take a look here.
Have an amazing day.

Hello, thank you very much, I am still confused a little about the server - client, I will follow your advice.