Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make a script that carries everything from one place to another within a game?

Asked by 8 years ago

Basically, I am wanting to make a script that carries everything over, from health, tools, lives, score, and armor.

Health is of course in your humanoid, tools are in the player object within the Players service, score is a global value located in game.Workspace.GlobalValues.Score, and armor is a number value within the character model.

How would I make a script that carries all of this over into another level with the same stats?
This is something I haven't touched before and I'd appreciate as much help as possbile, perhaps some code that I could work off of and learn how it transfers items and stats over onto a new place.

2 answers

Log in to vote
0
Answered by 8 years ago

Alright, so first what you should do for this to work is to make a game universe, create the starting place which is point A and create the next place which is point B. You can link them together by going to develop > Places > then find the place you want your player to start at > config > places > other places > add the second place to it. Now that we did that you will want to add a datastore to your game which is a lot to explain but the roblox wiki has a ton of useful stuff. So here is the jist, the player loads in with his or her leaderstats which will contain all the values let's say max health, then in a server script you would do a player added and character added inside the player added function. Inside of that you would do player.character.humanoid = player.leaderstats.playermaxhealth.value

I know that's a ton to take in but I won't be able to explain the full thing as it takes a while to explain

Ad
Log in to vote
-1
Answered by 8 years ago

I agree with kuro.

Answer this question