How to Make a Simulator on Roblox in 2022!

MonzterDEV
30 Sept 202212:08

Summary

TLDRIn this video series, you'll learn how to create a modern simulator in Roblox. Building on a previous 30-episode series, the creator has incorporated extensive feedback to improve both teaching methods and code quality. The course covers developing a clicker simulator and includes a community Discord for support. The first episode focuses on setting up player data using the Profile Service module, organizing scripts, and ensuring efficient data management. Viewers are encouraged to provide feedback and join the Patreon for access to scripts and game files.

Takeaways

  • ๐Ÿ˜€ The video series aims to teach viewers how to create a modern simulator in Roblox.
  • ๐Ÿ“š The creator has improved their video content and coding based on past feedback and criticism.
  • ๐Ÿ” The series will cover various topics with potential additions based on viewer feedback.
  • ๐Ÿ—‚๏ธ A community Discord is available for viewers to ask questions and get help with issues.
  • ๐Ÿ’ป The creator uses the Profile Service module for managing player data in a new and efficient way.
  • ๐Ÿ“ The Profile Service module is added to the Roblox workspace through the Roblox website.
  • ๐Ÿ“ Two folders, 'player data' and 'libs', are created in the server script service for organization.
  • ๐Ÿ’ฌ The 'template' script sets default player data such as clicks and gems, starting at zero for each player.
  • ๐Ÿ”‘ The 'manage' script is used to access and store player profiles in a table for easy data retrieval.
  • ๐Ÿ”„ The 'data' script handles the loading and unloading of player data when they join or leave the game.
  • ๐Ÿ“Š Leader stats are set up for player progress tracking, displaying clicks and gems earned.

Q & A

  • What is the main goal of the video series?

    -The main goal of the video series is to teach viewers how to create a modern simulator in Roblox, with the aim of making it one of the best series on YouTube for developing a game on Roblox.

  • What is the purpose of the Discord community mentioned in the video?

    -The Discord community serves as a platform for viewers to ask questions and get help from others who may have encountered the same issues while following the tutorial.

  • What is the role of the 'profile service module' in managing player data?

    -The 'profile service module' is used to manage player data in an organized and efficient way, allowing developers to easily access and manipulate player profiles within their game.

  • How does the video series handle the issue of player data management from the previous series?

    -The video series introduces a new and improved method of managing player data using the profile service module, which is considered a better and easier way compared to the previous approach.

  • What are the two types of currencies typically found in Roblox simulators?

    -The two types of currencies typically found in Roblox simulators are 'clicks' and 'gems', which are used as part of the game's economy and progression system.

  • How does the video guide the viewer in setting up the player data structure?

    -The video guides the viewer through creating a 'template' module script that defines the default data for each player, such as clicks and gems, and then setting up a 'manager' script to handle the loading and accessing of player profiles.

  • What is the purpose of the 'libs' folder in the server script service?

    -The 'libs' folder is used to store libraries or modules that are not created by the developer themselves but are used within the game to perform certain functions or tasks.

  • How does the video address the feedback on font size from previous videos?

    -The video acknowledges the feedback on font size and increases the font size for better readability, inviting viewers to comment if the new size is suitable or if adjustments are needed.

  • What is the function of the 'load profile' function in the script?

    -The 'load profile' function is responsible for loading a player's profile when they join the game, checking if the profile exists, and if not, it kicks the player with a predefined message.

  • How does the video handle the saving and loading of player data?

    -The video explains that player data is saved and loaded using the profile service, and it mentions that enabling Studio access to API Services in game settings is necessary for data to be saved properly.

  • What additional feature is added to the player data setup in the video?

    -The video adds leader stats to the player data setup, which allows for tracking and displaying player progress in clicks and gems currencies.

Outlines

00:00

๐Ÿ“š Introduction to Modern Simulator Series in Roblox

The video script introduces a series focused on creating a modern simulator in Roblox. The instructor acknowledges previous work and feedback received, expressing a commitment to improving the teaching approach and code quality. The series aims to be one of the best on YouTube for developing Roblox games. The instructor outlines the topics to be covered and invites viewers to provide feedback for additional topics. A community Discord is highlighted for support, and a Patreon link is provided for those interested in accessing scripts, game files, and other resources. The video then jumps into Roblox Studio, where the instructor begins by setting up player data using a new method involving the Profile Service module, emphasizing its simplicity and effectiveness.

05:00

๐Ÿ›  Setting Up Player Data with Profile Service Module

This paragraph delves into the technical process of setting up player data in Roblox using the Profile Service module. The instructor guides viewers through organizing their workspace with specific folders for player data and libraries. The Profile Service is obtained from the Roblox website and added to the workspace. The script then explains how to create a template for player data, including default values for two in-game currencies: clicks and gems. A 'manage' module script is created to handle player data access, and a 'data' script is set up to manage player joins and data loading/unloading. The importance of using a consistent key for data storage is emphasized to avoid data loss. The script also addresses viewer feedback on font size, aiming to enhance readability.

10:02

๐Ÿ”ข Implementing Leader Stats and Finalizing Player Data Setup

The final paragraph of the script covers the creation of leader stats for the game, which involves setting upๆ•ฐๅ€ผvalues for player clicks and gems. The instructor demonstrates how to create these stats as part of the player's profile and ensure they are correctly linked to the player's data. The script includes a function to create leader stats, which is called after the player's profile is set in the manager table. The video concludes with testing the setup in Roblox Studio, noting that while the Profile Service API is unavailable in Studio, the data will be saved when the game is published. The instructor encourages viewers to like, subscribe, and turn on post notifications for more content, and mentions a Patreon for additional scripts and files.

Mindmap

Keywords

๐Ÿ’กRoblox

Roblox is an online platform and game creation system that allows users to design their own games and play a wide variety of different types of games created by other users. In the context of the video, it is the environment where the modern simulator is being created, and it is central to the video's theme of game development.

๐Ÿ’กSimulator

A simulator in the video refers to a type of game in Roblox where players can simulate certain activities or manage resources. The video is focused on creating a 'clicker simulator,' a subgenre where players typically click on objects to accumulate resources or progress in the game.

๐Ÿ’กProfile Service Module

The Profile Service Module is a specific library used in Roblox for managing player data. It is introduced in the video as the best and easiest way to manage player data, playing a crucial role in the development of the game by storing and retrieving player profiles.

๐Ÿ’กPlayer Data

Player data refers to the information related to a player's progress, scores, and other statistics within a game. In the script, managing player data is a key focus, with the introduction of a new method to handle it using the Profile Service Module, which is essential for tracking player progress in the simulator being developed.

๐Ÿ’กModule Script

A module script in Roblox is a type of script that can be included in a game to provide functionality. In the video, module scripts are used to set up player data management, with specific scripts like 'template' and 'manager' being created to handle different aspects of player data.

๐Ÿ’กLibraries

In the context of the video, libraries refer to pre-written code that can be used in a game to perform certain tasks. The script mentions creating a 'libs' folder for these libraries, which are essential for simplifying development and reusing code in Roblox.

๐Ÿ’กLeader Stats

Leader stats in Roblox are used to display player rankings based on certain metrics within a game. In the video, the creation of leader stats for 'clicks' and 'gems' is demonstrated, showing how to integrate this feature to display player scores in the game.

๐Ÿ’กStudio Access

Studio Access in Roblox allows for certain API services to be used within the development environment. The script mentions enabling Studio access to API Services to ensure that player data can be saved and loaded properly, which is a critical step in the development process.

๐Ÿ’กDiscord

Discord is a communication platform mentioned in the video where the community can ask questions and get help. It is highlighted as a resource for viewers who may have issues while following the tutorial, providing a supportive community aspect to the video's theme of learning game development.

๐Ÿ’กTemplate

In the context of the video, a template refers to a predefined table of data that each player should have. It is used to set up the initial structure for player data, including default values for in-game currencies like 'clicks' and 'gems', which is fundamental to the setup of player profiles in the game.

๐Ÿ’กData Store

A data store in Roblox is used to save and load data persistently. The script discusses creating a profile store with a specific key, which is crucial for managing player data across game sessions, ensuring that player progress is saved and can be retrieved when they return to the game.

Highlights

Introduction to creating a modern simulator in Roblox, with an emphasis on improving video and code quality based on feedback.

Course overview provided, with topics to be expanded based on viewer feedback.

Invitation to join a community Discord for support and discussion on issues encountered during tutorials.

Introduction of a Patreon page offering additional resources such as scripts, game files, and models.

Explanation of the new approach to managing player data using the Profile Service module.

Demonstration of how to access and utilize the Profile Service module from the Roblox website.

Organization of workspace with folders for player data and libraries for better script management.

Creation of a template script defining player data structure with initial currency values set to zero.

Introduction of the 'manage' script for accessing and requiring player data in other scripts.

Setup of a 'data' script for handling player join and leave events, and managing data load and unload.

Implementation of a function to load a player's profile using the Profile Service store.

Use of type checking for better auto-completion and understanding of variable types in Roblox.

Handling of data issues by kicking players with a predefined message if their profile fails to load.

Reconciliation of player profiles with a template to ensure all necessary data is present.

Automatic addition of player profiles to a manager table for easy access in other scripts.

Setup of player data removal from the manager table upon player leaving to prevent data leaks.

Creation of leader stats for player currencies and linking them to the player's profile data.

Testing of the player data system in Roblox Studio and troubleshooting with API Services.

Conclusion summarizing the completion of working player data setup with plans for further expansion in future episodes.

Transcripts

play00:00

by the end of the series you'll know how

play00:01

to create a modern simulator in Roblox

play00:02

I've already

play00:04

on this topic before how to create a

play00:06

simulator in Roblox Studio which

play00:07

expanded over 30 episodes through that

play00:10

series I took an immense amount of

play00:11

feedback and criticism on how I can

play00:13

improve my videos for teaching you guys

play00:15

as well as improving my own code while

play00:17

working on countless other projects

play00:18

during the same time so my anticipation

play00:20

is to make this series one of the best

play00:22

on YouTube on how to actually begin

play00:23

developing your own game on Roblox and

play00:25

hopefully by the end of the series you

play00:27

guys can let me know how I did in this

play00:28

series we'll be creating our own version

play00:30

of the clicker simulator by pressure

play00:31

Studios on screen right now is a sort of

play00:33

course overview where you can see all

play00:35

the different topics that we'll be

play00:36

covering in this series well going

play00:38

through the series will most likely add

play00:39

even more topics to this as well and

play00:41

I'll certainly be looking at the

play00:42

comments to get feedback from you guys

play00:43

to see what you also want me to add to

play00:45

this as well now I'd also like to

play00:47

highlight our Discord we have a

play00:48

community Discord where a lot of people

play00:49

just like yourself who are watching all

play00:51

of my other tutorials come in and ask

play00:53

questions so if you're having an issue

play00:55

while watching a video join the Discord

play00:56

and most likely there will be somebody

play00:58

who has the exact same issue as you that

play01:00

already posted this in the Discord so

play01:01

you can easily get help and one last

play01:03

thing I have a page on you guys like to

play01:05

support me and gain access to all the

play01:06

script and the game file and models and

play01:08

other things like that that I make

play01:09

during my videos there's a link Down

play01:10

Below in the description and you guys

play01:12

can go and check that out with all that

play01:13

being said let's hop directly into

play01:14

studio now inside of my studio you guys

play01:16

can see inside of my workspace I already

play01:18

have a little map keep in mind if you

play01:20

want to access the map you can get it

play01:21

from the patreon but otherwise this map

play01:23

doesn't actually matter it's all just

play01:24

for Aesthetics and visuals and it's not

play01:26

going to have any effect on our

play01:27

scripting or anything like that with

play01:29

that being said what we're going to do

play01:30

for the first episode is start tripping

play01:31

out our player data now my previous

play01:33

series the way that I did player data

play01:34

was horrible so with this brand new

play01:36

series I'm really happy to start

play01:37

introducing you guys to the best and

play01:39

easiest way that you can actually manage

play01:41

your own players data it's super super

play01:43

simple what we're going to be using to

play01:44

manage our player data is actually

play01:45

called a module or a library and the

play01:48

specific one that we're going to be

play01:49

using is the profile service module if

play01:51

you like to access this there's a link

play01:52

Down Below in the description to this

play01:53

page which you guys can go to what

play01:55

you're going to want to do though is

play01:56

you're going to want to get the library

play01:57

model by going onto the Roblox website

play01:59

right here and clicking the get button

play02:01

now once you've done that you should be

play02:02

able to access it from your toolbox May

play02:04

maybe in your recent models or other

play02:05

things like that then just go ahead and

play02:07

click on that and it should add it

play02:08

directly into your workspace to keep

play02:10

everything organized the next thing

play02:11

we're going to do is we're going to go

play02:12

into the server script service and add a

play02:13

brand new folder and we're going to

play02:14

rename this to player data additionally

play02:17

we're going to create another folder

play02:18

inside of the server script service and

play02:19

we're going to rename this to lips

play02:21

l-i-b-s Libs is short for libraries and

play02:25

a lot of other coding languages when

play02:26

you're basically using somebody else's

play02:28

code to do something for you that's

play02:29

usually referred to as a library in luo

play02:32

or the Roblox Community we commonly

play02:33

refer to libraries as modules or other

play02:35

names like that personally I call them

play02:37

libraries so that's why I make a folder

play02:39

either in my server script service or

play02:40

replicated storage called lib so that I

play02:42

know this is where all the things that I

play02:44

didn't create myself and this is where

play02:45

all the libraries exist in my game so

play02:47

we're going to put the profile service

play02:48

inside of that folder and now we're done

play02:50

with that module we're never actually

play02:51

going to touch that module what we're

play02:52

then going to do is actually start

play02:54

setting up our player data the first

play02:55

thing we need to do is we actually need

play02:56

to insert a module script inside of the

play02:58

player data folder and we're actually

play03:00

going to rename this to template then we

play03:02

could also rename the variable as well

play03:03

from module 2 template just like that

play03:05

now what template's actually going to be

play03:07

set to it's going to be set to a table

play03:08

with all the data that each player

play03:10

should have this might sound confusing

play03:11

don't worry just keep following along

play03:13

with me and you should be able to get it

play03:14

by the end of this episode if you use

play03:15

leader stats in any of your game you can

play03:17

also think of those as your player data

play03:19

as well now pretty much every single

play03:20

simulator in the entire Roblox world has

play03:22

at least one commonality and that is

play03:23

that they always have two different

play03:25

currencies so for clicking simulator

play03:27

they have clicks and we're going to set

play03:29

the default value of that to zero so

play03:31

when a player joins our game they're

play03:32

going to start off by having zero clicks

play03:34

and the other currency that we're gonna

play03:35

have in our game is called gems and

play03:37

we're also going to set that to zero as

play03:38

well now if we set this to 100 then when

play03:40

a player first joins our game they will

play03:42

start off with a hundred gems but we

play03:44

want to start them off with zero now

play03:45

that's all we're going to do for the

play03:46

template so far because we're not going

play03:47

to do too much in this episode but every

play03:49

single episode where we actually start

play03:51

to add more and more player data all we

play03:53

have to do is come back to this table

play03:54

right here and add it to it and it is

play03:56

extremely simple you're gonna love it

play03:58

the next thing we need to do is we need

play03:59

to go back inside of the player data

play04:00

folder and add another module script and

play04:02

this is actually going to be called the

play04:03

manage because this is the module script

play04:05

that we're going to require in our other

play04:07

scripts if we ever want to access a

play04:09

player's data so we can also rename the

play04:10

variables as well to manager and now

play04:12

inside of here all we're going to do is

play04:13

actually create another variable and

play04:15

we're going to say manager dot profiles

play04:17

equals and then a blank table the way

play04:19

that the profile service basically works

play04:21

is that every single player gets their

play04:22

own profile which holds all of their

play04:24

data so whenever we generate the

play04:26

player's profile we're going to store it

play04:27

in this table right here so that we can

play04:29

go into other scripts and access this

play04:31

profile and get the player's data now

play04:33

that's all that we're going to do with

play04:33

this script for now the next thing we're

play04:35

going to do is we're going to create a

play04:36

script inside of the player data folder

play04:37

and we're going to rename this to data

play04:39

inside of here we're going to basically

play04:40

script up the entire system for whenever

play04:42

a player joins the game or leaves the

play04:43

game and load their data and unload

play04:45

their data when it should be also one

play04:47

comment I always got on my other videos

play04:48

was to increase my font size I'm not

play04:50

sure why it wasn't increased before

play04:51

because I thought it should have been

play04:53

but it seemed like it reset but I just

play04:54

increased it again so please let me know

play04:56

in the comment section if this size is

play04:57

good for you or if you need it to be a

play04:59

little bit larger anyway let's start

play05:00

declaring some variables up here so

play05:01

local players and we're going to get the

play05:03

player's service us we're also going to

play05:05

want to get the server script Service as

play05:07

well now that we've gone both of those

play05:08

Services we then need to get the

play05:09

template and the manager module so we're

play05:11

going to say local template equals

play05:13

require servicecript

play05:15

service.playerdata.template and then to

play05:16

get the manager we can just duplicate

play05:18

that variable and then just rename it

play05:19

just like that we also need to get the

play05:21

profile servers as well so I'm just

play05:23

going to duplicate this once again then

play05:25

from the server script service we're

play05:26

going to go into the libs folder and get

play05:27

the profile service just like that and

play05:29

then we just got to rename the variable

play05:30

and now that's all good the next thing

play05:32

we need to do is create a specific store

play05:33

for the profiles so we're going to

play05:35

create a variable called profile store

play05:37

and we're going to set that equal to the

play05:39

profileservice.getprofile store now the

play05:41

first argument we need to pass through

play05:42

to this is a specific key if you guys

play05:44

have ever used data stores before you

play05:45

need to do a similar thing where you

play05:47

basically come up with your own kick now

play05:48

for all my games when I go into

play05:50

production or release a brand new update

play05:51

the store is always production now if

play05:54

this key is different like let's say for

play05:55

instance we just started up our game and

play05:57

it was with production and then we

play05:58

changed it to five it would actually

play06:00

reset all of our data because we just

play06:02

changed the store that we're listening

play06:04

too so if I start this with six all of

play06:06

our data will be wiped but if I put it

play06:07

back to production all the data that was

play06:09

already in production will be used once

play06:11

again so basically while I'm testing

play06:13

I'll usually use the test profile store

play06:15

and then when I go to production or push

play06:16

on update I'll always make sure that I

play06:18

put that to production so that the

play06:19

players always have their same exact

play06:21

data that second argument that we need

play06:22

to pass through to here is our data

play06:24

template so we're going to say template

play06:25

just like that and now we have our

play06:26

profile store the next thing we need to

play06:28

do is we need to actually create a

play06:29

command for loading a player's profile

play06:30

so we're going to say local function

play06:32

load profile and this is going to accept

play06:35

a player now with most of my variables

play06:37

and arguments I like to assert its type

play06:38

so that we can get better Auto

play06:39

completion if you guys are unfamiliar

play06:41

with type checking and stuff like that

play06:42

Roblox you guys can check out my other

play06:44

video or follow along and you might even

play06:46

learn it while we go on so the type of

play06:47

this variable is going to be a player

play06:48

because of course when we call this

play06:49

function we're going to pass through a

play06:51

player the first thing we're going to do

play06:52

is we're going to try to get that

play06:53

player's profile so we're going to say

play06:54

local profile equals profile store make

play06:57

sure you say store not service and then

play06:58

we're gonna use a colon to call a method

play07:00

on this and we're going to say load

play07:01

profile async then we need to pass

play07:03

basically another other key to this and

play07:05

the key is going to be player underscore

play07:07

dot dot player.userid so now each player

play07:10

has their own unique key for accessing

play07:12

their profile now that we've got their

play07:13

profile we might not actually have it so

play07:15

we need to check if we do so we're going

play07:16

to say if not profile then so this means

play07:19

that if we didn't actually get their

play07:20

profile then what we want to do is we

play07:22

actually want to kick that player so

play07:23

we're going to say player kick and now

play07:25

we can pass a message inside of here

play07:26

what we're going to do is we're going to

play07:27

create a new variable called Kick

play07:29

underscore message and that's going to

play07:30

be all capital letters because it's

play07:32

going to be a constant this message is

play07:33

never going to change and this is going

play07:35

to be equal to a string which says data

play07:36

issue try again shortly if issue

play07:38

persists contact us okay so that's going

play07:41

to be your Kick message and then we're

play07:42

going to put that variable inside of

play07:43

this player kick right here so if the

play07:45

player's profile doesn't load then we're

play07:46

going to kick and then we also want to

play07:47

say return as well because we want to

play07:49

stop the script right there now if we

play07:51

are able to find the players profile we

play07:52

need to run a couple of methods on it so

play07:54

we're going to say profile and then we

play07:55

need to say add user ID and that's going

play07:57

to accept the player.userid then we need

play08:00

to run reconcile on it so we're going to

play08:01

say reconcile and what reconcile is

play08:03

going to to do is it's basically going

play08:05

to look at our template and make sure

play08:06

that the player's profile has all that

play08:08

data and if it doesn't then it'll add

play08:09

the new data to it and then finally we

play08:11

need to say profile listen to release

play08:13

and inside of here we're going to create

play08:15

an anonymous function and then what

play08:16

we're going to do is we are going to

play08:17

kick the player and we're going to kick

play08:19

them with the kick message once again

play08:20

after that we need to check if the

play08:22

player is descendant of and then the

play08:24

player's service and if that equals true

play08:27

then what we want to do is we want to

play08:28

use the manager and get the profiles

play08:30

table and then we want to add our player

play08:31

to that table and we want to set the

play08:33

variable equal to the profile so now

play08:35

both the player and the profiler inside

play08:36

of that table so anytime we index that

play08:38

table with a player we will get their

play08:40

profile which is perfect but if the

play08:41

player is not a descendant of the

play08:43

player's service then what we want to do

play08:44

we want to call Profile release just

play08:47

like that now there's one more thing

play08:48

that we want to do and while we're

play08:49

listening to the release we want to

play08:50

remove the player's profile from this

play08:52

table right here so what we're basically

play08:53

going to do is we're just going to copy

play08:55

this we're going to say manager.profiles

play08:57

index that with the player and then

play08:58

we're actually going to set that to nil

play08:59

so that we remove the player's profile

play09:01

from that table now that we have this

play09:02

function all set up but we then need to

play09:04

do is we need to listen for players to

play09:05

join and then call this function for

play09:07

them so we're going to say players dot

play09:08

player added and we'll connect that to

play09:10

the load profile function now

play09:11

additionally because we're in studio

play09:12

this script could load after other

play09:14

players have already joined the game so

play09:16

then we also need to Loop through all

play09:17

the players that are currently in the

play09:18

game as well so we're going to say four

play09:19

underscore player in players get players

play09:22

do and then we'll say task.spawn load

play09:25

profile and pass through the player just

play09:27

like that so now that we load their

play09:29

profile and we add it to our table we

play09:30

also need to make sure that we're

play09:31

removing this as well when the player

play09:33

leaves otherwise we're gonna have data

play09:35

leaks so we want to make sure that we

play09:36

listen for when they're leaving so

play09:37

players.player moving connect create an

play09:39

anonymous function inside of here which

play09:41

is going to accept the player and then

play09:42

we need to get their profile we're going

play09:43

to say local profile equals manager dot

play09:46

profiles index that with the player and

play09:48

if we do find the profile so if profile

play09:50

then we just want to call the release

play09:51

method on the profile just like that so

play09:54

now we have our player data pretty much

play09:55

set up but the last thing we want to do

play09:57

is we want to add leader stats to this

play09:58

as well leader stats are incredibly

play10:00

simple to set up so what we're going to

play10:01

do is we're going to create a new

play10:02

function towards the top of our script

play10:03

call called create leader stats and this

play10:06

is going to accept a player then the

play10:08

first thing is is we're going to create

play10:09

a variable for the player's profile so

play10:10

we're going to say local profile equals

play10:12

manager dot profiles and index that with

play10:14

the player and if not profile so if the

play10:16

profile doesn't exist then we're just

play10:18

going to return n and stop the function

play10:19

right there otherwise let's go ahead and

play10:21

create a variable for the leader sets or

play10:23

local leader stats equals instance dot

play10:25

new folder and parent that to the player

play10:27

we want to set the name of that folder

play10:28

to leader stats spelled exactly like

play10:31

that and that will create the leader

play10:32

stats for both the clicks and our gems

play10:34

currency so we're going to say local

play10:35

clicks equals instance dot new number

play10:38

value parent that to the leader stats

play10:40

then we need to make sure that we set

play10:41

the name of that to clicks and we need

play10:43

to make sure that we set the value of

play10:45

that to the

play10:46

profile.data.clicks so now we have the

play10:48

clicks value created the next thing

play10:49

we're going to do is create the gems

play10:50

value as well so we're going to say

play10:51

local gems make sure that we change all

play10:53

of those variables just like that change

play10:55

the name of it make sure that's parented

play10:56

to the leader stats and then also get

play10:58

the data as well so instead of clicks

play11:00

we're going to say gems and there we go

play11:01

now we need to make sure that we

play11:02

actually call this function and where we

play11:04

gonna do that well we're going to call

play11:05

it right after we set the player's

play11:07

profile in the manager table so we're

play11:08

going to say create leader stats pass

play11:10

through the player just like that and

play11:11

there we go now we can then go ahead and

play11:13

start up our game and test this out and

play11:14

make sure that it all works so as we can

play11:16

see in the output it says profile

play11:18

service Roblox API Services unavailable

play11:20

data will not be saved but it is loaded

play11:22

so that's good and we can also see that

play11:23

we have the leader sets up here as well

play11:25

which means that this is working

play11:26

perfectly now if you did what your data

play11:28

to save all you'd have to do is go to

play11:29

the game settings go into security

play11:31

enable Studio access to API Services hit

play11:34

save and then when you start up your

play11:35

game it should save your data perfectly

play11:37

and we can even see the message it does

play11:38

say that the data will be saved so

play11:40

ladies and gentlemen with that being

play11:41

said that's going to be it for this

play11:42

episode we now have working player data

play11:44

and we'll expand on that in the next

play11:45

episode as well hopefully you guys did

play11:47

enjoy if you did make sure you smash

play11:48

like button also the Subscribe button

play11:49

and turn this post notifications on if

play11:51

you want to get notified when we open

play11:52

more Roblox development content and I

play11:53

have a patreon if you guys like this for

play11:55

me and again access to a ton of scripts

play11:56

and the game files including the ones

play11:57

that I made in this episode this link

play11:59

down below description and you guys can

play12:00

go and check that out with that being

play12:01

said I'll see you guys in the next

play12:02

episode

play12:04

foreign

play12:06

[Music]

Rate This
โ˜…
โ˜…
โ˜…
โ˜…
โ˜…

5.0 / 5 (0 votes)

Related Tags
Roblox DevelopmentClicker SimulatorPlayer DataGame TutorialScripting GuideProfile ServiceLeader StatsGame DesignCoding TutorialCommunity Discord