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

Where is the problem here?

Hi guys I'm scripting my own wand from HP :) I'm stuck on Obliviate spell that should disable all the scripts in Player's wand. I think its good but well it doesn't work (Output says nothing, no error)

for i,v in pairs(wand:GetChildren()) do
if v:IsA("Script") then	
v.Disabled = true
wait(7)
v.Disabled = false	
end
end

2 comments

0

Is this script inside the wand?

0

Yes

1 answer

✓ Accepted answer

The script is disabling itself also @line 3

So add another conditional statement such as...

if v:IsA("Script") and v.Name ~= (Script You Don't Want Disabled's Name) then

1 comment

0

Or just add: if v:IsA("Script") and v.Name ~= script.Parent.Name then

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