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

The datastore key is true when I never changed it to true, and its supposed to be false?

I'm making a RPG save/load system, and when i'm making the "New Game" button, when someone clicks it, the script in it is supposed to check if the "char" key is false. And if it is continue with making a new game, else if it isn't false then change the "Welcome" text to "Can only have 1 class right now."

Script:

chards = game:GetService("DataStoreService"):GetDataStore("CharMade")

script.Parent.MouseButton1Click:connect(function()
	if chards:GetAsync("char") == false then
		script.Parent.Visible = false
		script.Parent.Parent.Load.Visible = false
		script.Parent.Parent.Welcome.Text = "Choose your class..."
		chards:SetAsync("char", true)
	else
		script.Parent.Parent.Welcome.Text = "Can only have 1 save right now, it will be added in future updates."
		wait(3)
		script.Parent.Parent.Welcome.Text = "Welcome to RPG! If you haven't played this before, please click New Game."
	end
end)

1 comment

0

(This is a normal script)

1 answer

try

player = -- insert player path here might be something like script.Parent.Parent.Parent.Parent
if chards:GetAsync("UserFirstTime" .. player.UserId )== false then -- line 04
chards:SetAsync("UserFirstTime".. player.UserId ,true)

2 comments

0

Still doesn't fix it.

0

I don't know its wrong on your end.

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