Basically I have a stringvalue of the players name So would I just go
_G.script.Parent.PlayerName.Value = 'StuffHere'
That's what I have so far but I won't be able to test until the entire script is finished so I need to know now if it'd work or if there's something else I need to do.
EDIT: To clarify what exactly I have so far
Structure Player - Script, PlayerName stringvalue
script
_G.script.Parent.PlayerName.Value={ bank={}, checks={bankchanged=false,inventorychanged=false,inventorylimitreached=false,skilling=false,stopanim=false}, inventory={}, resources={}, skills={cooking={level=1,xp=0},fishing={level=1,xp=0}} } --All the things that will be saved.
Nope, that would return nil.
The script is searching for a child of _G
named 'script'
.
To include lua syntax when using hierarchies:
_G[script.Parent.PlayerName.Value]
[]
is basically an alternate .