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

Maximum event re-entrancy depth exceeded for Instance.Changed Error?

So there error is here


01:47:15.541 - Maximum event re-entrancy depth exceeded for Instance.Changed 01:47:15.541 - While entering function defined in script 'Players.advancedev.PlayerGui.AdminGui.ExplorerFolder.PropertiesPanel.Properties', line 161 01:47:15.558 - Maximum event re-entrancy depth exceeded for Instance.Changed 01:47:15.558 - While entering function defined in script 'Players.advancedev.PlayerGui.AdminGui.ExplorerFolder.PropertiesPanel.Properties', line 161 01:47:15.575 - Maximum event re-entrancy depth exceeded for Instance.Changed 01:47:15.576 - While entering function defined in script 'Players.advancedev.PlayerGui.AdminGui.ExplorerFolder.PropertiesPanel.Properties', line 161 01:47:15.593 - Maximum event re-entrancy depth exceeded for Instance.Changed 01:47:15.594 - While entering function defined in script 'Players.advancedev.PlayerGui.AdminGui.ExplorerFolder.PropertiesPanel.Properties', line 161


The Script is Down Here

-- generik scroll:
local scroll = Properties:WaitForChild("ScrollFrame")
scroll:WaitForChild("ScrollBar"):WaitForChild("ScrollThumb")
local down,up
scroll.ScrollBar.MouseButton1Click:connect(function()
	scroll.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,scroll.ScrollBar.AbsolutePosition.Y-Mouse.Y)
end)
debounce = true
scroll.ScrollBar.ScrollThumb.Changed:connect(function ()
	scroll.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,scroll.ScrollBar.ScrollThumb.Position.Y.Offset)
	local p = scroll.ScrollBar.ScrollThumb.Position
	if p.Y.Offset < 0 then
		scroll.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,0)
	end
	if p.Y.Offset > scroll.ScrollBar.AbsoluteSize.Y-scroll.ScrollBar.ScrollThumb.Size.Y.Offset then
		scroll.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,scroll.ScrollBar.AbsoluteSize.Y-scroll.ScrollBar.ScrollThumb.Size.Y.Offset)
	end
	if p.Y.Offset > (23*#Properties.List:GetChildren())-(scroll.ScrollBar.ScrollThumb.Size.Y.Offset/2) then
		scroll.ScrollBar.ScrollThumb.Position = UDim2.new(0,0,0,(23*#Properties.List:GetChildren())-(scroll.ScrollBar.ScrollThumb.Size.Y.Offset/2))
	end
	for _,v in pairs(Properties.List:GetChildren())do
		v.Position = UDim2.new(0,0,0,v.BasePosition.Value)-UDim2.new(0,0,0,4*scroll.ScrollBar.ScrollThumb.Position.Y.Offset)
	end
end)
scroll.ScrollDown.MouseButton1Down:connect(function()
	down = true
	repeat wait(.001) for _,v in pairs(Properties.List:GetChildren())do v.Position = v.Position - UDim2.new(0,0,0,1) end until not down
end)
scroll.ScrollDown.MouseButton1Up:connect(function()
	down = false
end)
scroll.ScrollDown.MouseLeave:connect(function()
	down = false
end)
scroll.ScrollUp.MouseButton1Down:connect(function()
	up = true
	repeat wait(.001) for _,v in pairs(Properties.List:GetChildren())do v.Position = v.Position + UDim2.new(0,0,0,1) end until not up
end)
scroll.ScrollUp.MouseButton1Up:connect(function()
	up = false
end)
scroll.ScrollUp.MouseLeave:connect(function()
	up = false
end)


if you need full script here's the pastebin link


http://pastebin.com/raw/epANiFEk

1 answer

✓ Accepted answer

this means the event is being fired too fast. you may want to insert a debounce or wait() to prevent this

1 comment

0

ok

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