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

Want a script to be disabled by another script?

Asked by 6 years ago

Hi, I am trying to create a script where if a certain value in the local player is set to true then the script will disable another script. But if it is not, it won't disable the other script. Here is one I made that I don't know why it did not work

   if game.Players.LocalPlayer.Value.Value == true then
    print("hi") -- Testing if this actually work, it didn't print :(
    script.Parent.TimeOut.Disabled = true
    else
    script.Parent.TimeOut.Disabled = true

end

TimeOut is the name of the other script. I have another script that adds a value into the player that is set to true and if you click a button it sets it false, but the value does not appear until you first press the button, I don't know if that has something to do with why it won't work. I tried using findfirstchild as well, that did not work.

Please help,

0
Sorry, I have a similer problem. Mikey_bru 0 — 2y

Answer this question