But Its Only Shows error inside roblox
In Roblox Studio it doesnt show any error and everything is working fine
i already googling and search in roblox devforum for hours and i didnt get any help for this
local loading
local chunkgenerated = 0
game.Players.PlayerAdded:Connect(function(player)
loading = player.PlayerGui:WaitForChild("Loading")
end)
Inside a for loop chunkgenerated=chunkgenerated+1 loading:WaitForChild("Chunk").Text = "("..chunkgenerated.."/289) Chunk Generated"
the error come from “:WaitForChild(“Chunk”)”
I assume you have placed for __ do loop out of the function that runs on PlayerAdded event.
You can fix it by placing loop inside function scope like below.
game.Players.PlayerAdded:Connect(function(player)
local chunkgenerated = 0
local loading
loading = player.PlayerGui:WaitForChild("Loading")
repeat
chunkgenerated=chunkgenerated+1 loading:WaitForChild("Chunk").Text = ("chunkgenerated".."/289")
wait()
until chunkgenerated == 289
end)