I'm trying to delay action in a script until an event fires.
This is what I have
local Capturing = script.Parent.Capturing Capturing.Changed:connect(function(property) if property == false then end end)
Capturing is a BoolValue, part of the same model as the script btw. When ran, it completely skips over the event handler
Would I have to repeat wait() until the property == false, or can I use this in some way?
You're on the right track. Using the repeat until loop will help us here.
We can use a boolean variable to make sure an event is fired before continuing.
local Capturing = script.Parent.Capturing local captured = false Capturing.Changed:connect(function(property) if property then -- event related actions here -- has to be before captured = true captured = true end end) repeat wait() until captured -- continue