I encountered a problem that this folder could not be found in the player, but at first everything worked, I don’t know why it stopped working.
local plr = game.Players.LocalPlayer
local textSlots = script.Parent
local folder = plr:WaitForChild("BankFolder")
local slots = folder:WaitForChild("CarsSlots")
while wait(0.05) do
textSlots.Text = "Slots: "..slots.Value.."/5"
end
The folder exists in the player but it gives the following error:
Infinite yield possible on ‘Players.arsen2424657:WaitForChild(“BankFolder”)’
My only advice here would be to make sure the folder is named exactly like you wrote in the script and parented right. The problem is that the script cannot find “BankFolder” inside of the player and just waits for all eternity