Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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.

2 comments

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.

0

wow thats a terrible way to store a quest tbh

1 answer

✓ Accepted answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.