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

why is my scrolling frame script keep on crashing?

when i press the button it just crashes

script.Parent.MouseButton1Click:Connect(function()
local name = game.Players.LocalPlayer.Name
local children = workspace.buythings:GetChildren()
local nr = 1
local onr = 0
for i = 1, #children do
	local child = children[i]
	local newz = script.Parent.Parent.Empty:Clone()
	newz.Text = child.Name
	newz.Position = UDim2.new(0,0,0,onr)
	script.Parent.Parent.CanvasSize = UDim2.new(0,0,0,onr)
	newz.Parent = script.Parent.Parent
	nr=nr+.5
	onr=onr+50
	wait(.1)
end
end)

1 answer

Sometimes the Loop may run faster than your Computer can handle, in fact this is usually is the case. Simply slowing it down by .1 will not resolve your issue, the lowest you should go would be preferably .3 higher

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