Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help! Player is not a valid member of Data?

Asked by
Anubizx 76
6 years ago

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

Log in to vote
0
Answered by
Anubizx 76
6 years ago

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

local Credits = game.Players.LocalPlayer:WaitForChild("Data"):WaitForChild("Credits")
0
You wont need to wait for credits since Data already loaded Audiimo 105 — 6y
Ad

Answer this question