This post is discontinued. Scroll down to view the post before it was discontinued…
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
-
What do you want to achieve? Keep it simple and clear!
I want to fix my script so that I can replace “wait(#)” to an “Instance.Changed”. -
What is the issue? Include screenshots / videos if possible!
I just want to change my script but I don’t want people to unnecessary wait for the boolvalue to change to true.
Also just as a note: I modified the script a little bit to now stop me from getting the “…not a member of PlayerGui” error.
- What solutions have you tried so far (scripts I have for you to see)? Did you look for solutions on the Developer Hub?
-- Local Script --
local LocalPlr = script.Parent.Parent
local PlayerModule = require(LocalPlr.PlayerScripts:WaitForChild("PlayerModule"))
local Controls = PlayerModule:GetControls()
while true do
wait(0.05)
if LocalPlr.PlayerGui:WaitForChild("AlreadyDid").Value == false then
Controls:Disable()
elseif LocalPlr.PlayerGui:WaitForChild("AlreadyDid").Value == true then
Controls:Enable()
end
end
Yes I do, but it went over my head a little bit…