I made this script to get how many instances are in the game and displaying that.
local TotalInstances = game:GetChildren() local Stats = game:GetService("Stats") while true do script.Parent.Text = Stats.InstanceCount .. "/" .. #TotalInstances end
the script does not change the gui's text. Whats wrong?
Alrighty, I fixed your problem. First off, make a ScreenGui in StarterGui then add a TextLabel to it. And then add a LocalScript to the TextLabel. Then I added this script and everything worked!
local TotalInstances = game:GetChildren() local Stats = game:GetService("Stats") while true do wait() script.Parent.Text = Stats.InstanceCount .. "/" .. #TotalInstances end
I hope this helped!