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

Why wont this value change? (Based off conditional statement)

Asked by
Burobuu 18
5 years ago

For some odd reason, this won't work. I tried putting it in a while true do but that didn't work either. I am trying to have the value changed when two other values all under the same model equal a certain thing at the same time. I know the two values change and equal whats given below, so now im trying to figure out why it wont run.

\/ Original Script

script.Parent.Value=false

if script.Parent.Parent.CurrentTrackNumber==22 and script.Parent.Value==false then
    wait(10)
    script.Parent.Value=true
    wait(5)
    script.Parent.Value=false
end 


While true do Script

script.Parent.Value=false

while true do
if script.Parent.Parent.CurrentTrackNumber==22 and script.Parent.Value==false then
    wait(10)
    script.Parent.Value=true
    wait(5)
    script.Parent.Value=false
  end   
end

0
what is CurrentTrackNumber ? User#5423 17 — 5y
0
It is a number value Burobuu 18 — 5y
0
It is a number value that shares a model with scripts parent which is identified as "check" Burobuu 18 — 5y

Answer this question