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

Created a quest system but if a player dies it will reset, help?

Asked by 6 years ago

I've created a quest system with a gui. Basically theres a GUI on the bottom left and when you enter it says [NONE] but if you press a brick then the [NONE] will be changed to the quest name and once you press the finish brick the name will change to [Completed]. Now It works fine but if a player dies then the quests completed would just reset and change back to [NONE]. Please tell me a way so that even if the player dies the quests completed will stay the same.

1
That's because the PlayerGui restarts everytime a player resets. An easy solution would be to disable "ResetOnSpawn" in StarterGui properties. This solution isn't the best, but it works. Mayk728 855 — 6y
0
wow thats a terrible way to store a quest tbh hiimgoodpack 2009 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

You can simply make a value on the player called "CurrentQuest" so the quest name will save each time the player dies and this gives you an opportunity to use the Data Store to save the quest after quitting the game

Value = Instance.new("StringValue" , game.Players.LocalPlayer)
Value.Name = "CurrentQuest"
Value.Value = "PutTheQuestNameHere"

Then for the quest name you will do that

Quest.Text = game.Players.LocalPlayer.CurrentQuest.Value
Ad

Answer this question