Maximum event re-entrancy depth exceeded for instance.changed

i keep getting {maximum event re-entrancy depth exceeded for instance.changed} but i dont know what’s causing the problem i have only like 10 scripts that use “getpropertychangedsignal” if thats causing the problem idk . please any help will be apperciated

1 Like

also i forgot to add its like repeating 5000x times and crashing my roblox studio

1 Like

This is caused by recursion. One of your scripts changes the value on value change(without a condition stopping it from looping), causing this.

Basically, it’s the following scenario:

--this also applies for GetPropertyChangedSignal
val.Changed:Connect(function(value)
	--example where the value doesn't stay constant
	val.Value = value+1
end)

Where the following are true:

  1. The value changes during its own changed event and doesn’t remain constant.
  2. There’s no yielding between each change(no task.wait or :Wait()).
  3. There’s no condition stopping this from recursing.

It may be hard to detect which part of your script changes the value without yielding, due to abstractions like module functions or communication between complex systems.

2 Likes

how can i know which script is the one causing it becuase if i wanted to see the studio crash

but the problem i have no script that uses change function ?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.