error on line 3

local plr = game.Players.LocalPlayer

script.Parent.Text = "You will need  "..plr.RebirthFolder.RebirthRequirement.Value.." clicks in order to rebirth. Are you sure you want to rebirth?"

same error on this line of code in different script ( line 32 is the error )

local DS = game:GetService("DataStoreService"):GetDataStore("myDataStore")

game.Players.PlayerAdded:Connect(function(plr)
	wait()
	local plrkey = "id_"..plr.UserId
	local rebirthFolder = plr.RebirthFolder
	local clicks = plr.leaderstats.Clicks
	local rebirths = plr.leaderstats.Rebirths
	local multiplier = plr.Multiplier
	local rebirthRequirement = rebirthFolder.RebirthRequirement
	local rebirthMultiplier = rebirthFolder.RebirthMultiplier
	
	local GetSaved = DS:GetAsync(plrkey)
	if GetSaved then
		clicks.Value = GetSaved[1]
		rebirths.Value = GetSaved[2]
		multiplier.Value = GetSaved[3]
		rebirthRequirement.Value = GetSaved[4]
		rebirthMultiplier.Value = GetSaved[5]
	else
		local NumbersForSaving =
			{clicks.Value, rebirths.Value, multiplier.Value,
			rebirthRequirement.Value, rebirthMultiplier.Value}
		DS:GetAsync(plrkey, NumbersForSaving)
		print("Data Retrived")
	end
end)

game.Players.PlayerRemoving:Connect(function(plr)
	DS:GetAsync("id_"..plr.UserId,
		{plr.leaderstats.Clicks.Value, plr.leaderstats.Rebirths.Value,
			plr.Multiplier.Value, plr.RebirthFolder.RebirthRequirement.Value,
			plr.RebirthFolder.RebirthMultiplier.Value})
	print("Data Saved")
end)

2 comments

0

Could you please post the line of code where you give the g9ve the plauer the rebirth folder?

0

arleady Solved :) ima change the thing