Hey, I'm very new to scripting and wondering what im missing/doing wrong here to try and get the result I'm looking for.
When a Part gets added to a Folder i want it to update as a Value of how many Objects are in that Folder.
Local Script:
local cookiecounter = game.ReplicatedStorage:WaitForChild("CookieCount")
script.Parent.Text = cookiecounter.Value
cookiecounter.Changed:Connect(function()
script.Parent.Text = cookiecounter.Value
end)
Script:
local cookiecounter = game.ReplicatedStorage:WaitForChild("CookieCount")
local cookiecount = game.Workspace:WaitForChild("CookieStorage")
local children = cookiecount:GetChildren()
local count = #children
cookiecounter.Value = count
Thank you to anyone who can give me some advice/guidance
