Attempt to index number with ' Name '

Provide an overview of:

  • What does the code do and what are you not satisfied with?

The code is supose to add Exp to but is say’s that attempt to index with ’ Name ', probrably i need put a .Name in somewhere, the code basically add Exp to data Exp Player.

local DataOfPlayer = DataStore:WaitForChild("BlindFunction"):Invoke("GetData", Player)
DataStore:WaitForChild("BlindFunction"):Invoke("ChangeData", Player, "EtcMasteryExp", playerData["EtcMasteryExp"] + (math.random(1, 10)))

Thanks.

1 Like

Its because your doing “.Name” to a number, a number doesnt have a name to it.

but where im doing the .Name is have other thing in the code i was supose to show sorry

hey can you show where i can remove the “.Name” plss i dont locate it well. ;( srry

Change the category to #help-and-feedback:scripting-support, you have better chances of getting a response there.