I've been working on a security camera system and I need every proximity prompt to be hidden when the cameras are being used. However I've been struggling. I've tried using a for loop however no look.
local function DisablePrompts(Parentt) for i = 1, #Parentt:GetChildren() do if Parentt:GetChildren()[i]:IsA("ProximityPrompt") then Parentt:GetChildren()[i].MaxActivationDistance = 0 else DisablePrompts(Parentt:GetChildren()[i]) end end end
I hope someone has a solution. Thank you in advanced!
Try Parentt:GetDescendants()
local function DisablePrompt(Parentt) for _, ProximityPrompt in ipairs(Parentt:GetDescendants()) do ProximityPrompt.Enabled = false end end