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

Help! Player is not a valid member of Data?

Hello, i developed a DataBase system and i'm trying to create a Profile Menu but i got this error: Player is not a valid member of Data

Data is my DataBase like leaderstats.

Script code:

local Credits = game.Players.LocalPlayer.Data.Credits

while true do
script.Parent.Text = "Credits:  "..Credits.Value
wait()
end

1 answer

I fixed it! Just need to change the code for:

local Credits = game.Players.LocalPlayer:WaitForChild("Data"):WaitForChild("Credits")

1 comment

0

You wont need to wait for credits since Data already loaded

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