Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Where is the problem here?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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
0
Is this script inside the wand? PreciseLogic 271 — 8y
0
Yes Dominqx 0 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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
0
Or just add: if v:IsA("Script") and v.Name ~= script.Parent.Name then ShiftedGears 70 — 8y
Ad

Answer this question