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

Attempt to index nil with "Bucks" ?

So I was making a data store I got an error

"Attempt to index nil with Bucks"

Script:

	if success then
		jacobBucks.Value = player_data.Bucks
	end

	local player_data = {
		Bucks = player.leaderstats.Bucks.Value
	}

1 comment

0

What is player defined as? And is it in a function?

1 answer

When initializing Bucks, try using WaitForChild, You most likely tried to access Bucks before it loaded, if you are trying to use the explorer for Bucks

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