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

why doesn't this local script in playergui work?

the item's parent value is default at 10 and I've waited and used autofill to make sure that everything is correct

	if script.Parent.Value==10 then
   script.Parent.Parent.beta.Enabled = true
end

2 comments

0

Is that the full script?

0

yes

1 answer

✓ Accepted answer

###The problem lies in the fact that you wrong assume that the script will run each time the Value of script.Parent changes. The script will run once; it will not run again until the PlayerGui has been reset. In order to fix this, you can use a Changed event which will fire each time the Value changes.

script.Parent.Changed:Connect(function(newVal)
    if script.Parent.Value==10 then
       script.Parent.Parent.beta.Enabled = true
    end
end)

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