Any idea why newCheck and posCheck do not change when prompted?
newCheck = script.Parent.New posCheck = script.Parent.Parent.Window.Detect.Bool greenLight = script.Parent.Parent.Window.pRemain detector = script.Parent.Parent.Window.Detect finish = script.Parent.Parent.Window.End if newCheck.Value == true then script.Parent.Humanoid:MoveTo(detector.Position, detector) end function detection(hit) newCheck.Value = false posCheck.Value = true if greenLight == 0 then script.Parent.Humanoid:MoveTo(finish.Position, finish) end detector.Touched:connect(detection) end
This might work? Worth a try
newCheck = script.Parent.New posCheck = script.Parent.Parent.Window.Detect.Bool greenLight = script.Parent.Parent.Window.pRemain detector = script.Parent.Parent.Window.Detect finish = script.Parent.Parent.Window.End if newCheck.Value == true then script.Parent.Humanoid:MoveTo(detector.Position, detector) end function detection(hit) newCheck.Value = false posCheck.Value = true if greenLight == 0 then script.Parent.Humanoid:MoveTo(finish.Position, finish) end end detector.Touched:connect(detection) -- put event listener outside function