I have this script where it finds infomation and display it on a GUI.Unfortunatly,its not working.
This is the output(on Play Solo):
Players.Player.PlayerGui.MainGui.Background.ServerBrowser.R:2: attempt to index field 'Name' (a string value)
The area in where the script is:
- ServerBrowser
+ Back
- Row1
getStats(Script)<---This is the script!
Title(TextLabel)
Name(TextLabel)
Players(TextLabel)
+ Bar
+ Title
And here is the script:
function getStats()
script.Parent.Name.Text = game.Workspace.Games.Name1.Value
script.Parent.Players.Text = ""..game.Workspace.Games.Name1.onlinePlayers.Value.."/"..game.Workspace.Games.Name1.maxPlayers.Value..""
script.Parent.Type.Text = game.Workspace.Games.Name1.CardType.Value
end
while true do
wait()
getStats()
end |