Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Script not running a for loop?

function run()
			miguild = GuildID[house2:GetAsync("Joined")]
			script.Parent.GuildName.Text = miguild
			
			
	player:WaitForDataReady()
	if game:GetService("DataStoreService"):GetOrderedDataStore("Members",miguild):GetSortedAsync(false,50,0,2147483647) ~= nil then
	c_v = game:GetService("DataStoreService"):GetOrderedDataStore("Members",miguild):GetSortedAsync(false,50,0,2147483647)
	data = c_v:GetCurrentPage()
	for k,v in pairs(data) do
		print("whomp")
		if v ~= nil then
			local name = v.key
			local kills = v.value
			local current = template:clone()
			create(k,name,kills)
		
		end
	end
	end
	print("woop")
end

changed a portion into a function

For "for k,v..." and everything inside does not run and does not output "whomp"

1 answer

✓ Accepted answer

You did not call your function.

1 comment

0

This is a portion of my script changed into a function.

This discussion is preserved as it was. New answers, comments, and votes are closed.