When the script tries to find out information on the path “game:GetService(“Workspace”).NameValue.Value”.
it recognizes it, but if this information is used in the path “game.Players.PlayerName.Settings.Data.Ability.Value” then roblox gives the error “PlayerName is not a valid member of Players ‘Players’” can you help me how to fix this error?
Script:
local Window = Library.CreateLib("Player infomation", "RJTheme3")
local PlayerName = game:GetService("Workspace").NameValue.Value
local Tab = Window:NewTab("Stand")
local Section = Tab:NewSection("")
local stand = game.Players.PlayerName.Settings.Data.Ability.Value
Section:NewLabel(stand)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local Tab = Window:NewTab("Cash")
local Section = Tab:NewSection("")
local cash = game.Players.PlayerName.Settings.Data.Cash.Value
Section:NewLabel(cash)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local Tab = Window:NewTab("Stand in storage")
local Section = Tab:NewSection("")
local StandInStorage1 = game.Players.PlayerName.Data["Ability Storage"].Ability_Slot1.Value
local StandInStorage2 = game.Players.PlayerName.Data["Ability Storage"].Ability_Slot2.Value
local StandInStorage3 = game.Players.PlayerName.Data["Ability Storage"].Ability_Slot3.Value
local StandInStorage4 = game.Players.PlayerName.Data["Ability Storage"].Ability_Slot4.Value
local StandInStorage5 = game.Players.PlayerName.Data["Ability Storage"].Ability_Slot5.Value
local StandInStorage6 = game.Players.PlayerName.Data["Ability Storage"].Ability_Slot6.Value
Section:NewLabel(StandInStorage1)
Section:NewLabel(StandInStorage2)
Section:NewLabel(StandInStorage3)
Section:NewLabel(StandInStorage4)
Section:NewLabel(StandInStorage5)
Section:NewLabel(StandInStorage6)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local Tab = Window:NewTab("Item in storage")
local Section = Tab:NewSection("")
local ItemInStorage1 = game.Players.PlayerName.Data["Item Storage"].Item_Slot1.Value
local ItemInStorage2 = game.Players.PlayerName.Data["Item Storage"].Item_Slot2.Value
local ItemInStorage3 = game.Players.PlayerName.Data["Item Storage"].Item_Slot3.Value
local ItemInStorage4 = game.Players.PlayerName.Data["Item Storage"].Item_Slot4.Value
local ItemInStorage5 = game.Players.PlayerName.Data["Item Storage"].Item_Slot5.Value
local ItemInStorage6 = game.Players.PlayerName.Data["Item Storage"].Item_Slot6.Value
Section:NewLabel(ItemInStorage1)
Section:NewLabel(ItemInStorage2)
Section:NewLabel(ItemInStorage3)
Section:NewLabel(ItemInStorage4)
Section:NewLabel(ItemInStorage5)
Section:NewLabel(ItemInStorage6)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local Tab = Window:NewTab("Settings")
local Section = Tab:NewSection("")
local Camera_Shake = game.Players.PlayerName.Settings["Camera Shake"].Value
local CameraShake = game.Players.PlayerName.Settings.CameraShake.Value
local LowGraphics = game.Players.PlayerName.Settings["Low Graphics"].Value
local Music = game.Players.PlayerName.Settings.Music.Value
Section:NewLabel(Camera_Shake)
Section:NewLabel(CameraShake)
Section:NewLabel(LowGraphics)
Section:NewLabel(Music)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local Tab = Window:NewTab("Leaderstats")
local Section = Tab:NewSection("")
local leaderstats = game.Players.PlayerName.leaderstats["Total Kill"].Value
Section:NewLabel(leaderstats)```
[Here's what StringValue looks like:](https://i.sstatic.net/ZEEC8KmS.png)
I tried setting PlayerName like this:
game.Players. “PlayerName”.Settings.Data.Ability.Value
game.Players.[“PlayerName”].Settings.Data.Ability.Value
game.Players[“PlayerName”].Settings.Data.Ability.Value
game.Players.PlayerName.Settings.Data.Ability.Value
I wanted the menu to display all the information I wrote in the script.
New contributor
Андрей Антонович is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.